!function (t) {
    function e(i) {
        if (n[i]) return n[i].exports;
        var r = n[i] = {exports: {}, id: i, loaded: !1};
        return t[i].call(r.exports, r, r.exports, e), r.loaded = !0, r.exports
    }

    var n = {};
    return e.m = t, e.c = n, e.p = "", e(0)
}([function (t, e, n) {/*!
	 * main.js
	 * @date 2017.11.1
	 * @author chenjinghui@meizu.com
	 * @version 0.0.1
	 */
    "use strict";
    n(1);
    var i = n(29), r = n(30), o = (n(31), n(32)), s = n(33), a = n(36), c = n(38), u = n(39), l = n(41), h = n(42),
        d = n(44), p = n(47), f = n(49), v = n(50), m = n(51), g = n(52), y = n(61), b = n(65), w = n(66), _ = n(70),
        k = n(72), x = window.MZ.modelData, T = new m.ProModel({
            recommend: v.getRecommend(v.queryString("skuid"), x),
            packageMap: x.packageMap,
            skus: x.sku,
            packageItems: x.packageItems,
            isSupportCart: x.isSupportCart,
            isPackage: !r.isEmpty(x.packageMap),
            discountKeys: x.discount ? Object.keys(x.discount.cspuMap) : null
        });
    window.livePropertyView = new g({
        el: document.body,
        model: T,
        collection: new m.SkuCollection(v.parseSku(x.sku))
    }), new _(window.livePropertyView), new y(window.livePropertyView), new b(window.livePropertyView), new w(window.livePropertyView, x.supportFastArrival), new s, d(), p(MZ.modelData.itemId), h(), o(), u(), l.attach(document.body), k(MZ.modelData.showItemRecommend, MZ.modelData.itemId), /android/.test(navigator.userAgent.toLowerCase()) && a.init({
        insetBefore: "#headerBack",
        show: function () {
            i("body").css("padding-top", i("#headerOpacity").height())
        },
        remove: function () {
            i("body").css("padding-top", 0)
        }
    }), i(function () {
        f();
        var t = "yes" === v.queryString("dnoa");
        t || c("detail", {
            adfrom: "mall",
            from: "detail",
            itemId: x.itemId,
            itemNumber: x.itemNumber,
            skuId: window.livePropertyView.model.get("skuId") || 0
        })
    })
}, function (t, e) {
}, , , , , , , , , , , , , , , , , , , , , , , , , , , , function (t, e) {
    t.exports = Zepto
}, function (t, e, n) {
    var i, r;
    (function () {
        function n(t) {
            function e(e, n, i, r, o, s) {
                for (; o >= 0 && o < s; o += t) {
                    var a = r ? r[o] : o;
                    i = n(i, e[a], a, e)
                }
                return i
            }

            return function (n, i, r, o) {
                i = x(i, o, 4);
                var s = !A(n) && k.keys(n), a = (s || n).length, c = t > 0 ? 0 : a - 1;
                return arguments.length < 3 && (r = n[s ? s[c] : c], c += t), e(n, i, r, s, c, a)
            }
        }

        function o(t) {
            return function (e, n, i) {
                n = T(n, i);
                for (var r = I(e), o = t > 0 ? 0 : r - 1; o >= 0 && o < r; o += t) if (n(e[o], o, e)) return o;
                return -1
            }
        }

        function s(t, e, n) {
            return function (i, r, o) {
                var s = 0, a = I(i);
                if ("number" == typeof o) t > 0 ? s = o >= 0 ? o : Math.max(o + a, s) : a = o >= 0 ? Math.min(o + 1, a) : o + a + 1; else if (n && o && a) return o = n(i, r), i[o] === r ? o : -1;
                if (r !== r) return o = e(f.call(i, s, a), k.isNaN), o >= 0 ? o + s : -1;
                for (o = t > 0 ? s : a - 1; o >= 0 && o < a; o += t) if (i[o] === r) return o;
                return -1
            }
        }

        function a(t, e) {
            var n = j.length, i = t.constructor, r = k.isFunction(i) && i.prototype || h, o = "constructor";
            for (k.has(t, o) && !k.contains(e, o) && e.push(o); n--;) o = j[n], o in t && t[o] !== r[o] && !k.contains(e, o) && e.push(o)
        }

        var c = this, u = c._, l = Array.prototype, h = Object.prototype, d = Function.prototype, p = l.push,
            f = l.slice, v = h.toString, m = h.hasOwnProperty, g = Array.isArray, y = Object.keys, b = d.bind,
            w = Object.create, _ = function () {
            }, k = function (t) {
                return t instanceof k ? t : this instanceof k ? void(this._wrapped = t) : new k(t)
            };
        "undefined" != typeof t && t.exports && (e = t.exports = k), e._ = k, k.VERSION = "1.8.3";
        var x = function (t, e, n) {
            if (void 0 === e) return t;
            switch (null == n ? 3 : n) {
                case 1:
                    return function (n) {
                        return t.call(e, n)
                    };
                case 2:
                    return function (n, i) {
                        return t.call(e, n, i)
                    };
                case 3:
                    return function (n, i, r) {
                        return t.call(e, n, i, r)
                    };
                case 4:
                    return function (n, i, r, o) {
                        return t.call(e, n, i, r, o)
                    }
            }
            return function () {
                return t.apply(e, arguments)
            }
        }, T = function (t, e, n) {
            return null == t ? k.identity : k.isFunction(t) ? x(t, e, n) : k.isObject(t) ? k.matcher(t) : k.property(t)
        };
        k.iteratee = function (t, e) {
            return T(t, e, 1 / 0)
        };
        var S = function (t, e) {
            return function (n) {
                var i = arguments.length;
                if (i < 2 || null == n) return n;
                for (var r = 1; r < i; r++) for (var o = arguments[r], s = t(o), a = s.length, c = 0; c < a; c++) {
                    var u = s[c];
                    e && void 0 !== n[u] || (n[u] = o[u])
                }
                return n
            }
        }, E = function (t) {
            if (!k.isObject(t)) return {};
            if (w) return w(t);
            _.prototype = t;
            var e = new _;
            return _.prototype = null, e
        }, P = function (t) {
            return function (e) {
                return null == e ? void 0 : e[t]
            }
        }, C = Math.pow(2, 53) - 1, I = P("length"), A = function (t) {
            var e = I(t);
            return "number" == typeof e && e >= 0 && e <= C
        };
        k.each = k.forEach = function (t, e, n) {
            e = x(e, n);
            var i, r;
            if (A(t)) for (i = 0, r = t.length; i < r; i++) e(t[i], i, t); else {
                var o = k.keys(t);
                for (i = 0, r = o.length; i < r; i++) e(t[o[i]], o[i], t)
            }
            return t
        }, k.map = k.collect = function (t, e, n) {
            e = T(e, n);
            for (var i = !A(t) && k.keys(t), r = (i || t).length, o = Array(r), s = 0; s < r; s++) {
                var a = i ? i[s] : s;
                o[s] = e(t[a], a, t)
            }
            return o
        }, k.reduce = k.foldl = k.inject = n(1), k.reduceRight = k.foldr = n(-1), k.find = k.detect = function (t, e, n) {
            var i;
            if (i = A(t) ? k.findIndex(t, e, n) : k.findKey(t, e, n), void 0 !== i && i !== -1) return t[i]
        }, k.filter = k.select = function (t, e, n) {
            var i = [];
            return e = T(e, n), k.each(t, function (t, n, r) {
                e(t, n, r) && i.push(t)
            }), i
        }, k.reject = function (t, e, n) {
            return k.filter(t, k.negate(T(e)), n)
        }, k.every = k.all = function (t, e, n) {
            e = T(e, n);
            for (var i = !A(t) && k.keys(t), r = (i || t).length, o = 0; o < r; o++) {
                var s = i ? i[o] : o;
                if (!e(t[s], s, t)) return !1
            }
            return !0
        }, k.some = k.any = function (t, e, n) {
            e = T(e, n);
            for (var i = !A(t) && k.keys(t), r = (i || t).length, o = 0; o < r; o++) {
                var s = i ? i[o] : o;
                if (e(t[s], s, t)) return !0
            }
            return !1
        }, k.contains = k.includes = k.include = function (t, e, n, i) {
            return A(t) || (t = k.values(t)), ("number" != typeof n || i) && (n = 0), k.indexOf(t, e, n) >= 0
        }, k.invoke = function (t, e) {
            var n = f.call(arguments, 2), i = k.isFunction(e);
            return k.map(t, function (t) {
                var r = i ? e : t[e];
                return null == r ? r : r.apply(t, n)
            })
        }, k.pluck = function (t, e) {
            return k.map(t, k.property(e))
        }, k.where = function (t, e) {
            return k.filter(t, k.matcher(e))
        }, k.findWhere = function (t, e) {
            return k.find(t, k.matcher(e))
        }, k.max = function (t, e, n) {
            var i, r, o = -(1 / 0), s = -(1 / 0);
            if (null == e && null != t) {
                t = A(t) ? t : k.values(t);
                for (var a = 0, c = t.length; a < c; a++) i = t[a], i > o && (o = i)
            } else e = T(e, n), k.each(t, function (t, n, i) {
                r = e(t, n, i), (r > s || r === -(1 / 0) && o === -(1 / 0)) && (o = t, s = r)
            });
            return o
        }, k.min = function (t, e, n) {
            var i, r, o = 1 / 0, s = 1 / 0;
            if (null == e && null != t) {
                t = A(t) ? t : k.values(t);
                for (var a = 0, c = t.length; a < c; a++) i = t[a], i < o && (o = i)
            } else e = T(e, n), k.each(t, function (t, n, i) {
                r = e(t, n, i), (r < s || r === 1 / 0 && o === 1 / 0) && (o = t, s = r)
            });
            return o
        }, k.shuffle = function (t) {
            for (var e, n = A(t) ? t : k.values(t), i = n.length, r = Array(i), o = 0; o < i; o++) e = k.random(0, o), e !== o && (r[o] = r[e]), r[e] = n[o];
            return r
        }, k.sample = function (t, e, n) {
            return null == e || n ? (A(t) || (t = k.values(t)), t[k.random(t.length - 1)]) : k.shuffle(t).slice(0, Math.max(0, e))
        }, k.sortBy = function (t, e, n) {
            return e = T(e, n), k.pluck(k.map(t, function (t, n, i) {
                return {value: t, index: n, criteria: e(t, n, i)}
            }).sort(function (t, e) {
                var n = t.criteria, i = e.criteria;
                if (n !== i) {
                    if (n > i || void 0 === n) return 1;
                    if (n < i || void 0 === i) return -1
                }
                return t.index - e.index
            }), "value")
        };
        var M = function (t) {
            return function (e, n, i) {
                var r = {};
                return n = T(n, i), k.each(e, function (i, o) {
                    var s = n(i, o, e);
                    t(r, i, s)
                }), r
            }
        };
        k.groupBy = M(function (t, e, n) {
            k.has(t, n) ? t[n].push(e) : t[n] = [e]
        }), k.indexBy = M(function (t, e, n) {
            t[n] = e
        }), k.countBy = M(function (t, e, n) {
            k.has(t, n) ? t[n]++ : t[n] = 1
        }), k.toArray = function (t) {
            return t ? k.isArray(t) ? f.call(t) : A(t) ? k.map(t, k.identity) : k.values(t) : []
        }, k.size = function (t) {
            return null == t ? 0 : A(t) ? t.length : k.keys(t).length
        }, k.partition = function (t, e, n) {
            e = T(e, n);
            var i = [], r = [];
            return k.each(t, function (t, n, o) {
                (e(t, n, o) ? i : r).push(t)
            }), [i, r]
        }, k.first = k.head = k.take = function (t, e, n) {
            if (null != t) return null == e || n ? t[0] : k.initial(t, t.length - e)
        }, k.initial = function (t, e, n) {
            return f.call(t, 0, Math.max(0, t.length - (null == e || n ? 1 : e)))
        }, k.last = function (t, e, n) {
            if (null != t) return null == e || n ? t[t.length - 1] : k.rest(t, Math.max(0, t.length - e))
        }, k.rest = k.tail = k.drop = function (t, e, n) {
            return f.call(t, null == e || n ? 1 : e)
        }, k.compact = function (t) {
            return k.filter(t, k.identity)
        };
        var D = function (t, e, n, i) {
            for (var r = [], o = 0, s = i || 0, a = I(t); s < a; s++) {
                var c = t[s];
                if (A(c) && (k.isArray(c) || k.isArguments(c))) {
                    e || (c = D(c, e, n));
                    var u = 0, l = c.length;
                    for (r.length += l; u < l;) r[o++] = c[u++]
                } else n || (r[o++] = c)
            }
            return r
        };
        k.flatten = function (t, e) {
            return D(t, e, !1)
        }, k.without = function (t) {
            return k.difference(t, f.call(arguments, 1))
        }, k.uniq = k.unique = function (t, e, n, i) {
            k.isBoolean(e) || (i = n, n = e, e = !1), null != n && (n = T(n, i));
            for (var r = [], o = [], s = 0, a = I(t); s < a; s++) {
                var c = t[s], u = n ? n(c, s, t) : c;
                e ? (s && o === u || r.push(c), o = u) : n ? k.contains(o, u) || (o.push(u), r.push(c)) : k.contains(r, c) || r.push(c)
            }
            return r
        }, k.union = function () {
            return k.uniq(D(arguments, !0, !0))
        }, k.intersection = function (t) {
            for (var e = [], n = arguments.length, i = 0, r = I(t); i < r; i++) {
                var o = t[i];
                if (!k.contains(e, o)) {
                    for (var s = 1; s < n && k.contains(arguments[s], o); s++) ;
                    s === n && e.push(o)
                }
            }
            return e
        }, k.difference = function (t) {
            var e = D(arguments, !0, !0, 1);
            return k.filter(t, function (t) {
                return !k.contains(e, t)
            })
        }, k.zip = function () {
            return k.unzip(arguments)
        }, k.unzip = function (t) {
            for (var e = t && k.max(t, I).length || 0, n = Array(e), i = 0; i < e; i++) n[i] = k.pluck(t, i);
            return n
        }, k.object = function (t, e) {
            for (var n = {}, i = 0, r = I(t); i < r; i++) e ? n[t[i]] = e[i] : n[t[i][0]] = t[i][1];
            return n
        }, k.findIndex = o(1), k.findLastIndex = o(-1), k.sortedIndex = function (t, e, n, i) {
            n = T(n, i, 1);
            for (var r = n(e), o = 0, s = I(t); o < s;) {
                var a = Math.floor((o + s) / 2);
                n(t[a]) < r ? o = a + 1 : s = a
            }
            return o
        }, k.indexOf = s(1, k.findIndex, k.sortedIndex), k.lastIndexOf = s(-1, k.findLastIndex), k.range = function (t, e, n) {
            null == e && (e = t || 0, t = 0), n = n || 1;
            for (var i = Math.max(Math.ceil((e - t) / n), 0), r = Array(i), o = 0; o < i; o++, t += n) r[o] = t;
            return r
        };
        var N = function (t, e, n, i, r) {
            if (!(i instanceof e)) return t.apply(n, r);
            var o = E(t.prototype), s = t.apply(o, r);
            return k.isObject(s) ? s : o
        };
        k.bind = function (t, e) {
            if (b && t.bind === b) return b.apply(t, f.call(arguments, 1));
            if (!k.isFunction(t)) throw new TypeError("Bind must be called on a function");
            var n = f.call(arguments, 2), i = function () {
                return N(t, i, e, this, n.concat(f.call(arguments)))
            };
            return i
        }, k.partial = function (t) {
            var e = f.call(arguments, 1), n = function () {
                for (var i = 0, r = e.length, o = Array(r), s = 0; s < r; s++) o[s] = e[s] === k ? arguments[i++] : e[s];
                for (; i < arguments.length;) o.push(arguments[i++]);
                return N(t, n, this, this, o)
            };
            return n
        }, k.bindAll = function (t) {
            var e, n, i = arguments.length;
            if (i <= 1) throw new Error("bindAll must be passed function names");
            for (e = 1; e < i; e++) n = arguments[e], t[n] = k.bind(t[n], t);
            return t
        }, k.memoize = function (t, e) {
            var n = function (i) {
                var r = n.cache, o = "" + (e ? e.apply(this, arguments) : i);
                return k.has(r, o) || (r[o] = t.apply(this, arguments)), r[o]
            };
            return n.cache = {}, n
        }, k.delay = function (t, e) {
            var n = f.call(arguments, 2);
            return setTimeout(function () {
                return t.apply(null, n)
            }, e)
        }, k.defer = k.partial(k.delay, k, 1), k.throttle = function (t, e, n) {
            var i, r, o, s = null, a = 0;
            n || (n = {});
            var c = function () {
                a = n.leading === !1 ? 0 : k.now(), s = null, o = t.apply(i, r), s || (i = r = null)
            };
            return function () {
                var u = k.now();
                a || n.leading !== !1 || (a = u);
                var l = e - (u - a);
                return i = this, r = arguments, l <= 0 || l > e ? (s && (clearTimeout(s), s = null), a = u, o = t.apply(i, r), s || (i = r = null)) : s || n.trailing === !1 || (s = setTimeout(c, l)), o
            }
        }, k.debounce = function (t, e, n) {
            var i, r, o, s, a, c = function () {
                var u = k.now() - s;
                u < e && u >= 0 ? i = setTimeout(c, e - u) : (i = null, n || (a = t.apply(o, r), i || (o = r = null)))
            };
            return function () {
                o = this, r = arguments, s = k.now();
                var u = n && !i;
                return i || (i = setTimeout(c, e)), u && (a = t.apply(o, r), o = r = null), a
            }
        }, k.wrap = function (t, e) {
            return k.partial(e, t)
        }, k.negate = function (t) {
            return function () {
                return !t.apply(this, arguments)
            }
        }, k.compose = function () {
            var t = arguments, e = t.length - 1;
            return function () {
                for (var n = e, i = t[e].apply(this, arguments); n--;) i = t[n].call(this, i);
                return i
            }
        }, k.after = function (t, e) {
            return function () {
                if (--t < 1) return e.apply(this, arguments)
            }
        }, k.before = function (t, e) {
            var n;
            return function () {
                return --t > 0 && (n = e.apply(this, arguments)), t <= 1 && (e = null), n
            }
        }, k.once = k.partial(k.before, 2);
        var O = !{toString: null}.propertyIsEnumerable("toString"),
            j = ["valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"];
        k.keys = function (t) {
            if (!k.isObject(t)) return [];
            if (y) return y(t);
            var e = [];
            for (var n in t) k.has(t, n) && e.push(n);
            return O && a(t, e), e
        }, k.allKeys = function (t) {
            if (!k.isObject(t)) return [];
            var e = [];
            for (var n in t) e.push(n);
            return O && a(t, e), e
        }, k.values = function (t) {
            for (var e = k.keys(t), n = e.length, i = Array(n), r = 0; r < n; r++) i[r] = t[e[r]];
            return i
        }, k.mapObject = function (t, e, n) {
            e = T(e, n);
            for (var i, r = k.keys(t), o = r.length, s = {}, a = 0; a < o; a++) i = r[a], s[i] = e(t[i], i, t);
            return s
        }, k.pairs = function (t) {
            for (var e = k.keys(t), n = e.length, i = Array(n), r = 0; r < n; r++) i[r] = [e[r], t[e[r]]];
            return i
        }, k.invert = function (t) {
            for (var e = {}, n = k.keys(t), i = 0, r = n.length; i < r; i++) e[t[n[i]]] = n[i];
            return e
        }, k.functions = k.methods = function (t) {
            var e = [];
            for (var n in t) k.isFunction(t[n]) && e.push(n);
            return e.sort()
        }, k.extend = S(k.allKeys), k.extendOwn = k.assign = S(k.keys), k.findKey = function (t, e, n) {
            e = T(e, n);
            for (var i, r = k.keys(t), o = 0, s = r.length; o < s; o++) if (i = r[o], e(t[i], i, t)) return i
        }, k.pick = function (t, e, n) {
            var i, r, o = {}, s = t;
            if (null == s) return o;
            k.isFunction(e) ? (r = k.allKeys(s), i = x(e, n)) : (r = D(arguments, !1, !1, 1), i = function (t, e, n) {
                return e in n
            }, s = Object(s));
            for (var a = 0, c = r.length; a < c; a++) {
                var u = r[a], l = s[u];
                i(l, u, s) && (o[u] = l)
            }
            return o
        }, k.omit = function (t, e, n) {
            if (k.isFunction(e)) e = k.negate(e); else {
                var i = k.map(D(arguments, !1, !1, 1), String);
                e = function (t, e) {
                    return !k.contains(i, e)
                }
            }
            return k.pick(t, e, n)
        }, k.defaults = S(k.allKeys, !0), k.create = function (t, e) {
            var n = E(t);
            return e && k.extendOwn(n, e), n
        }, k.clone = function (t) {
            return k.isObject(t) ? k.isArray(t) ? t.slice() : k.extend({}, t) : t
        }, k.tap = function (t, e) {
            return e(t), t
        }, k.isMatch = function (t, e) {
            var n = k.keys(e), i = n.length;
            if (null == t) return !i;
            for (var r = Object(t), o = 0; o < i; o++) {
                var s = n[o];
                if (e[s] !== r[s] || !(s in r)) return !1
            }
            return !0
        };
        var L = function (t, e, n, i) {
            if (t === e) return 0 !== t || 1 / t === 1 / e;
            if (null == t || null == e) return t === e;
            t instanceof k && (t = t._wrapped), e instanceof k && (e = e._wrapped);
            var r = v.call(t);
            if (r !== v.call(e)) return !1;
            switch (r) {
                case"[object RegExp]":
                case"[object String]":
                    return "" + t == "" + e;
                case"[object Number]":
                    return +t !== +t ? +e !== +e : 0 === +t ? 1 / +t === 1 / e : +t === +e;
                case"[object Date]":
                case"[object Boolean]":
                    return +t === +e
            }
            var o = "[object Array]" === r;
            if (!o) {
                if ("object" != typeof t || "object" != typeof e) return !1;
                var s = t.constructor, a = e.constructor;
                if (s !== a && !(k.isFunction(s) && s instanceof s && k.isFunction(a) && a instanceof a) && "constructor" in t && "constructor" in e) return !1
            }
            n = n || [], i = i || [];
            for (var c = n.length; c--;) if (n[c] === t) return i[c] === e;
            if (n.push(t), i.push(e), o) {
                if (c = t.length, c !== e.length) return !1;
                for (; c--;) if (!L(t[c], e[c], n, i)) return !1
            } else {
                var u, l = k.keys(t);
                if (c = l.length, k.keys(e).length !== c) return !1;
                for (; c--;) if (u = l[c], !k.has(e, u) || !L(t[u], e[u], n, i)) return !1
            }
            return n.pop(), i.pop(), !0
        };
        k.isEqual = function (t, e) {
            return L(t, e)
        }, k.isEmpty = function (t) {
            return null == t || (A(t) && (k.isArray(t) || k.isString(t) || k.isArguments(t)) ? 0 === t.length : 0 === k.keys(t).length)
        }, k.isElement = function (t) {
            return !(!t || 1 !== t.nodeType)
        }, k.isArray = g || function (t) {
            return "[object Array]" === v.call(t)
        }, k.isObject = function (t) {
            var e = typeof t;
            return "function" === e || "object" === e && !!t
        }, k.each(["Arguments", "Function", "String", "Number", "Date", "RegExp", "Error"], function (t) {
            k["is" + t] = function (e) {
                return v.call(e) === "[object " + t + "]"
            }
        }), k.isArguments(arguments) || (k.isArguments = function (t) {
            return k.has(t, "callee")
        }), "function" != typeof/./ && "object" != typeof Int8Array && (k.isFunction = function (t) {
            return "function" == typeof t || !1
        }), k.isFinite = function (t) {
            return isFinite(t) && !isNaN(parseFloat(t))
        }, k.isNaN = function (t) {
            return k.isNumber(t) && t !== +t
        }, k.isBoolean = function (t) {
            return t === !0 || t === !1 || "[object Boolean]" === v.call(t)
        }, k.isNull = function (t) {
            return null === t
        }, k.isUndefined = function (t) {
            return void 0 === t
        }, k.has = function (t, e) {
            return null != t && m.call(t, e)
        }, k.noConflict = function () {
            return c._ = u, this
        }, k.identity = function (t) {
            return t
        }, k.constant = function (t) {
            return function () {
                return t
            }
        }, k.noop = function () {
        }, k.property = P, k.propertyOf = function (t) {
            return null == t ? function () {
            } : function (e) {
                return t[e]
            }
        }, k.matcher = k.matches = function (t) {
            return t = k.extendOwn({}, t), function (e) {
                return k.isMatch(e, t)
            }
        }, k.times = function (t, e, n) {
            var i = Array(Math.max(0, t));
            e = x(e, n, 1);
            for (var r = 0; r < t; r++) i[r] = e(r);
            return i
        }, k.random = function (t, e) {
            return null == e && (e = t, t = 0), t + Math.floor(Math.random() * (e - t + 1))
        }, k.now = Date.now || function () {
            return (new Date).getTime()
        };
        var z = {"&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#x27;", "`": "&#x60;"}, B = k.invert(z),
            q = function (t) {
                var e = function (e) {
                    return t[e]
                }, n = "(?:" + k.keys(t).join("|") + ")", i = RegExp(n), r = RegExp(n, "g");
                return function (t) {
                    return t = null == t ? "" : "" + t, i.test(t) ? t.replace(r, e) : t
                }
            };
        k.escape = q(z), k.unescape = q(B), k.result = function (t, e, n) {
            var i = null == t ? void 0 : t[e];
            return void 0 === i && (i = n), k.isFunction(i) ? i.call(t) : i
        };
        var R = 0;
        k.uniqueId = function (t) {
            var e = ++R + "";
            return t ? t + e : e
        }, k.templateSettings = {
            evaluate: /<%([\s\S]+?)%>/g,
            interpolate: /<%=([\s\S]+?)%>/g,
            escape: /<%-([\s\S]+?)%>/g
        };
        var F = /(.)^/, H = {"'": "'", "\\": "\\", "\r": "r", "\n": "n", "\u2028": "u2028", "\u2029": "u2029"},
            X = /\\|'|\r|\n|\u2028|\u2029/g, Y = function (t) {
                return "\\" + H[t]
            };
        k.template = function (t, e, n) {
            !e && n && (e = n), e = k.defaults({}, e, k.templateSettings);
            var i = RegExp([(e.escape || F).source, (e.interpolate || F).source, (e.evaluate || F).source].join("|") + "|$", "g"),
                r = 0, o = "__p+='";
            t.replace(i, function (e, n, i, s, a) {
                return o += t.slice(r, a).replace(X, Y), r = a + e.length, n ? o += "'+\n((__t=(" + n + "))==null?'':_.escape(__t))+\n'" : i ? o += "'+\n((__t=(" + i + "))==null?'':__t)+\n'" : s && (o += "';\n" + s + "\n__p+='"), e
            }), o += "';\n", e.variable || (o = "with(obj||{}){\n" + o + "}\n"), o = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + o + "return __p;\n";
            try {
                var s = new Function(e.variable || "obj", "_", o)
            } catch (t) {
                throw t.source = o, t
            }
            var a = function (t) {
                return s.call(this, t, k)
            }, c = e.variable || "obj";
            return a.source = "function(" + c + "){\n" + o + "}", a
        }, k.chain = function (t) {
            var e = k(t);
            return e._chain = !0, e
        };
        var $ = function (t, e) {
            return t._chain ? k(e).chain() : e
        };
        k.mixin = function (t) {
            k.each(k.functions(t), function (e) {
                var n = k[e] = t[e];
                k.prototype[e] = function () {
                    var t = [this._wrapped];
                    return p.apply(t, arguments), $(this, n.apply(k, t))
                }
            })
        }, k.mixin(k), k.each(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function (t) {
            var e = l[t];
            k.prototype[t] = function () {
                var n = this._wrapped;
                return e.apply(n, arguments), "shift" !== t && "splice" !== t || 0 !== n.length || delete n[0], $(this, n)
            }
        }), k.each(["concat", "join", "slice"], function (t) {
            var e = l[t];
            k.prototype[t] = function () {
                return $(this, e.apply(this._wrapped, arguments))
            }
        }), k.prototype.value = function () {
            return this._wrapped
        }, k.prototype.valueOf = k.prototype.toJSON = k.prototype.value, k.prototype.toString = function () {
            return "" + this._wrapped
        }, i = [], r = function () {
            return k
        }.apply(e, i), !(void 0 !== r && (t.exports = r))
    }).call(this)
}, function (t, e, n) {
    var i, r;
    (function (o) {
        !function (s) {
            var a = "object" == typeof self && self.self === self && self || "object" == typeof o && o.global === o && o;
            i = [n(30), n(29), e], r = function (t, e, n) {
                a.Backbone = s(a, n, t, e)
            }.apply(e, i), !(void 0 !== r && (t.exports = r))
        }(function (t, e, n, i) {
            var r = t.Backbone, o = Array.prototype.slice;
            e.VERSION = "1.2.3", e.$ = i, e.noConflict = function () {
                return t.Backbone = r, this
            }, e.emulateHTTP = !1, e.emulateJSON = !1;
            var s = function (t, e, i) {
                switch (t) {
                    case 1:
                        return function () {
                            return n[e](this[i])
                        };
                    case 2:
                        return function (t) {
                            return n[e](this[i], t)
                        };
                    case 3:
                        return function (t, r) {
                            return n[e](this[i], c(t, this), r)
                        };
                    case 4:
                        return function (t, r, o) {
                            return n[e](this[i], c(t, this), r, o)
                        };
                    default:
                        return function () {
                            var t = o.call(arguments);
                            return t.unshift(this[i]), n[e].apply(n, t)
                        }
                }
            }, a = function (t, e, i) {
                n.each(e, function (e, r) {
                    n[r] && (t.prototype[r] = s(e, r, i))
                })
            }, c = function (t, e) {
                return n.isFunction(t) ? t : n.isObject(t) && !e._isModel(t) ? u(t) : n.isString(t) ? function (e) {
                    return e.get(t)
                } : t
            }, u = function (t) {
                var e = n.matches(t);
                return function (t) {
                    return e(t.attributes)
                }
            }, l = e.Events = {}, h = /\s+/, d = function (t, e, i, r, o) {
                var s, a = 0;
                if (i && "object" == typeof i) {
                    void 0 !== r && "context" in o && void 0 === o.context && (o.context = r);
                    for (s = n.keys(i); a < s.length; a++) e = d(t, e, s[a], i[s[a]], o)
                } else if (i && h.test(i)) for (s = i.split(h); a < s.length; a++) e = t(e, s[a], r, o); else e = t(e, i, r, o);
                return e
            };
            l.on = function (t, e, n) {
                return p(this, t, e, n)
            };
            var p = function (t, e, n, i, r) {
                if (t._events = d(f, t._events || {}, e, n, {context: i, ctx: t, listening: r}), r) {
                    var o = t._listeners || (t._listeners = {});
                    o[r.id] = r
                }
                return t
            };
            l.listenTo = function (t, e, i) {
                if (!t) return this;
                var r = t._listenId || (t._listenId = n.uniqueId("l")),
                    o = this._listeningTo || (this._listeningTo = {}), s = o[r];
                if (!s) {
                    var a = this._listenId || (this._listenId = n.uniqueId("l"));
                    s = o[r] = {obj: t, objId: r, id: a, listeningTo: o, count: 0}
                }
                return p(t, e, i, this, s), this
            };
            var f = function (t, e, n, i) {
                if (n) {
                    var r = t[e] || (t[e] = []), o = i.context, s = i.ctx, a = i.listening;
                    a && a.count++, r.push({callback: n, context: o, ctx: o || s, listening: a})
                }
                return t
            };
            l.off = function (t, e, n) {
                return this._events ? (this._events = d(v, this._events, t, e, {
                    context: n,
                    listeners: this._listeners
                }), this) : this
            }, l.stopListening = function (t, e, i) {
                var r = this._listeningTo;
                if (!r) return this;
                for (var o = t ? [t._listenId] : n.keys(r), s = 0; s < o.length; s++) {
                    var a = r[o[s]];
                    if (!a) break;
                    a.obj.off(e, i, this)
                }
                return this
            };
            var v = function (t, e, i, r) {
                if (t) {
                    var o, s = 0, a = r.context, c = r.listeners;
                    if (e || i || a) {
                        for (var u = e ? [e] : n.keys(t); s < u.length; s++) {
                            e = u[s];
                            var l = t[e];
                            if (!l) break;
                            for (var h = [], d = 0; d < l.length; d++) {
                                var p = l[d];
                                i && i !== p.callback && i !== p.callback._callback || a && a !== p.context ? h.push(p) : (o = p.listening, o && 0 === --o.count && (delete c[o.id], delete o.listeningTo[o.objId]))
                            }
                            h.length ? t[e] = h : delete t[e]
                        }
                        return t
                    }
                    for (var f = n.keys(c); s < f.length; s++) o = c[f[s]], delete c[o.id], delete o.listeningTo[o.objId]
                }
            };
            l.once = function (t, e, i) {
                var r = d(m, {}, t, e, n.bind(this.off, this));
                return this.on(r, e, i)
            }, l.listenToOnce = function (t, e, i) {
                var r = d(m, {}, e, i, n.bind(this.stopListening, this, t));
                return this.listenTo(t, r)
            };
            var m = function (t, e, i, r) {
                if (i) {
                    var o = t[e] = n.once(function () {
                        r(e, o), i.apply(this, arguments)
                    });
                    o._callback = i
                }
                return t
            };
            l.trigger = function (t) {
                if (!this._events) return this;
                for (var e = Math.max(0, arguments.length - 1), n = Array(e), i = 0; i < e; i++) n[i] = arguments[i + 1];
                return d(g, this._events, t, void 0, n), this
            };
            var g = function (t, e, n, i) {
                if (t) {
                    var r = t[e], o = t.all;
                    r && o && (o = o.slice()), r && y(r, i), o && y(o, [e].concat(i))
                }
                return t
            }, y = function (t, e) {
                var n, i = -1, r = t.length, o = e[0], s = e[1], a = e[2];
                switch (e.length) {
                    case 0:
                        for (; ++i < r;) (n = t[i]).callback.call(n.ctx);
                        return;
                    case 1:
                        for (; ++i < r;) (n = t[i]).callback.call(n.ctx, o);
                        return;
                    case 2:
                        for (; ++i < r;) (n = t[i]).callback.call(n.ctx, o, s);
                        return;
                    case 3:
                        for (; ++i < r;) (n = t[i]).callback.call(n.ctx, o, s, a);
                        return;
                    default:
                        for (; ++i < r;) (n = t[i]).callback.apply(n.ctx, e);
                        return
                }
            };
            l.bind = l.on, l.unbind = l.off, n.extend(e, l);
            var b = e.Model = function (t, e) {
                var i = t || {};
                e || (e = {}), this.cid = n.uniqueId(this.cidPrefix), this.attributes = {}, e.collection && (this.collection = e.collection), e.parse && (i = this.parse(i, e) || {});
                var r = n.result(this, "defaults");
                i = n.defaults(n.extend({}, r, i), r), this.set(i, e), this.changed = {}, this.initialize.apply(this, arguments)
            };
            n.extend(b.prototype, l, {
                changed: null,
                validationError: null,
                idAttribute: "id",
                cidPrefix: "c",
                initialize: function () {
                },
                toJSON: function (t) {
                    return n.clone(this.attributes)
                },
                sync: function () {
                    return e.sync.apply(this, arguments)
                },
                get: function (t) {
                    return this.attributes[t]
                },
                escape: function (t) {
                    return n.escape(this.get(t))
                },
                has: function (t) {
                    return null != this.get(t)
                },
                matches: function (t) {
                    return !!n.iteratee(t, this)(this.attributes)
                },
                set: function (t, e, i) {
                    if (null == t) return this;
                    var r;
                    if ("object" == typeof t ? (r = t, i = e) : (r = {})[t] = e, i || (i = {}), !this._validate(r, i)) return !1;
                    var o = i.unset, s = i.silent, a = [], c = this._changing;
                    this._changing = !0, c || (this._previousAttributes = n.clone(this.attributes), this.changed = {});
                    var u = this.attributes, l = this.changed, h = this._previousAttributes;
                    for (var d in r) e = r[d], n.isEqual(u[d], e) || a.push(d), n.isEqual(h[d], e) ? delete l[d] : l[d] = e, o ? delete u[d] : u[d] = e;
                    if (this.idAttribute in r && (this.id = this.get(this.idAttribute)), !s) {
                        a.length && (this._pending = i);
                        for (var p = 0; p < a.length; p++) this.trigger("change:" + a[p], this, u[a[p]], i)
                    }
                    if (c) return this;
                    if (!s) for (; this._pending;) i = this._pending, this._pending = !1, this.trigger("change", this, i);
                    return this._pending = !1, this._changing = !1, this
                },
                unset: function (t, e) {
                    return this.set(t, void 0, n.extend({}, e, {unset: !0}))
                },
                clear: function (t) {
                    var e = {};
                    for (var i in this.attributes) e[i] = void 0;
                    return this.set(e, n.extend({}, t, {unset: !0}))
                },
                hasChanged: function (t) {
                    return null == t ? !n.isEmpty(this.changed) : n.has(this.changed, t)
                },
                changedAttributes: function (t) {
                    if (!t) return !!this.hasChanged() && n.clone(this.changed);
                    var e = this._changing ? this._previousAttributes : this.attributes, i = {};
                    for (var r in t) {
                        var o = t[r];
                        n.isEqual(e[r], o) || (i[r] = o)
                    }
                    return !!n.size(i) && i
                },
                previous: function (t) {
                    return null != t && this._previousAttributes ? this._previousAttributes[t] : null
                },
                previousAttributes: function () {
                    return n.clone(this._previousAttributes)
                },
                fetch: function (t) {
                    t = n.extend({parse: !0}, t);
                    var e = this, i = t.success;
                    return t.success = function (n) {
                        var r = t.parse ? e.parse(n, t) : n;
                        return !!e.set(r, t) && (i && i.call(t.context, e, n, t), void e.trigger("sync", e, n, t))
                    }, F(this, t), this.sync("read", this, t)
                },
                save: function (t, e, i) {
                    var r;
                    null == t || "object" == typeof t ? (r = t, i = e) : (r = {})[t] = e, i = n.extend({
                        validate: !0,
                        parse: !0
                    }, i);
                    var o = i.wait;
                    if (r && !o) {
                        if (!this.set(r, i)) return !1
                    } else if (!this._validate(r, i)) return !1;
                    var s = this, a = i.success, c = this.attributes;
                    i.success = function (t) {
                        s.attributes = c;
                        var e = i.parse ? s.parse(t, i) : t;
                        return o && (e = n.extend({}, r, e)), !(e && !s.set(e, i)) && (a && a.call(i.context, s, t, i), void s.trigger("sync", s, t, i))
                    }, F(this, i), r && o && (this.attributes = n.extend({}, c, r));
                    var u = this.isNew() ? "create" : i.patch ? "patch" : "update";
                    "patch" !== u || i.attrs || (i.attrs = r);
                    var l = this.sync(u, this, i);
                    return this.attributes = c, l
                },
                destroy: function (t) {
                    t = t ? n.clone(t) : {};
                    var e = this, i = t.success, r = t.wait, o = function () {
                        e.stopListening(), e.trigger("destroy", e, e.collection, t)
                    };
                    t.success = function (n) {
                        r && o(), i && i.call(t.context, e, n, t), e.isNew() || e.trigger("sync", e, n, t)
                    };
                    var s = !1;
                    return this.isNew() ? n.defer(t.success) : (F(this, t), s = this.sync("delete", this, t)), r || o(), s
                },
                url: function () {
                    var t = n.result(this, "urlRoot") || n.result(this.collection, "url") || R();
                    if (this.isNew()) return t;
                    var e = this.get(this.idAttribute);
                    return t.replace(/[^\/]$/, "$&/") + encodeURIComponent(e)
                },
                parse: function (t, e) {
                    return t
                },
                clone: function () {
                    return new this.constructor(this.attributes)
                },
                isNew: function () {
                    return !this.has(this.idAttribute)
                },
                isValid: function (t) {
                    return this._validate({}, n.extend({}, t, {validate: !0}))
                },
                _validate: function (t, e) {
                    if (!e.validate || !this.validate) return !0;
                    t = n.extend({}, this.attributes, t);
                    var i = this.validationError = this.validate(t, e) || null;
                    return !i || (this.trigger("invalid", this, i, n.extend(e, {validationError: i})), !1)
                }
            });
            var w = {keys: 1, values: 1, pairs: 1, invert: 1, pick: 0, omit: 0, chain: 1, isEmpty: 1};
            a(b, w, "attributes");
            var _ = e.Collection = function (t, e) {
                e || (e = {}), e.model && (this.model = e.model), void 0 !== e.comparator && (this.comparator = e.comparator), this._reset(), this.initialize.apply(this, arguments), t && this.reset(t, n.extend({silent: !0}, e))
            }, k = {add: !0, remove: !0, merge: !0}, x = {add: !0, remove: !1}, T = function (t, e, n) {
                n = Math.min(Math.max(n, 0), t.length);
                var i, r = Array(t.length - n), o = e.length;
                for (i = 0; i < r.length; i++) r[i] = t[i + n];
                for (i = 0; i < o; i++) t[i + n] = e[i];
                for (i = 0; i < r.length; i++) t[i + o + n] = r[i]
            };
            n.extend(_.prototype, l, {
                model: b, initialize: function () {
                }, toJSON: function (t) {
                    return this.map(function (e) {
                        return e.toJSON(t)
                    })
                }, sync: function () {
                    return e.sync.apply(this, arguments)
                }, add: function (t, e) {
                    return this.set(t, n.extend({merge: !1}, e, x))
                }, remove: function (t, e) {
                    e = n.extend({}, e);
                    var i = !n.isArray(t);
                    t = i ? [t] : t.slice();
                    var r = this._removeModels(t, e);
                    return !e.silent && r.length && (e.changes = {
                        added: [],
                        merged: [],
                        removed: r
                    }, this.trigger("update", this, e)), i ? r[0] : r
                }, set: function (t, e) {
                    if (null != t) {
                        e = n.extend({}, k, e), e.parse && !this._isModel(t) && (t = this.parse(t, e) || []);
                        var i = !n.isArray(t);
                        t = i ? [t] : t.slice();
                        var r = e.at;
                        null != r && (r = +r), r > this.length && (r = this.length), r < 0 && (r += this.length + 1);
                        var o, s, a = [], c = [], u = [], l = [], h = {}, d = e.add, p = e.merge, f = e.remove, v = !1,
                            m = this.comparator && null == r && e.sort !== !1,
                            g = n.isString(this.comparator) ? this.comparator : null;
                        for (s = 0; s < t.length; s++) {
                            o = t[s];
                            var y = this.get(o);
                            if (y) {
                                if (p && o !== y) {
                                    var b = this._isModel(o) ? o.attributes : o;
                                    e.parse && (b = y.parse(b, e)), y.set(b, e), u.push(y), m && !v && (v = y.hasChanged(g))
                                }
                                h[y.cid] || (h[y.cid] = !0, a.push(y)), t[s] = y
                            } else d && (o = t[s] = this._prepareModel(o, e), o && (c.push(o), this._addReference(o, e), h[o.cid] = !0, a.push(o)))
                        }
                        if (f) {
                            for (s = 0; s < this.length; s++) o = this.models[s], h[o.cid] || l.push(o);
                            l.length && this._removeModels(l, e)
                        }
                        var w = !1, _ = !m && d && f;
                        if (a.length && _ ? (w = this.length !== a.length || n.some(this.models, function (t, e) {
                                return t !== a[e]
                            }), this.models.length = 0, T(this.models, a, 0), this.length = this.models.length) : c.length && (m && (v = !0), T(this.models, c, null == r ? this.length : r), this.length = this.models.length), v && this.sort({silent: !0}), !e.silent) {
                            for (s = 0; s < c.length; s++) null != r && (e.index = r + s), o = c[s], o.trigger("add", o, this, e);
                            (v || w) && this.trigger("sort", this, e), (c.length || l.length || u.length) && (e.changes = {
                                added: c,
                                removed: l,
                                merged: u
                            }, this.trigger("update", this, e))
                        }
                        return i ? t[0] : t
                    }
                }, reset: function (t, e) {
                    e = e ? n.clone(e) : {};
                    for (var i = 0; i < this.models.length; i++) this._removeReference(this.models[i], e);
                    return e.previousModels = this.models, this._reset(), t = this.add(t, n.extend({silent: !0}, e)), e.silent || this.trigger("reset", this, e), t
                }, push: function (t, e) {
                    return this.add(t, n.extend({at: this.length}, e))
                }, pop: function (t) {
                    var e = this.at(this.length - 1);
                    return this.remove(e, t)
                }, unshift: function (t, e) {
                    return this.add(t, n.extend({at: 0}, e))
                }, shift: function (t) {
                    var e = this.at(0);
                    return this.remove(e, t)
                }, slice: function () {
                    return o.apply(this.models, arguments)
                }, get: function (t) {
                    if (null != t) return this._byId[t] || this._byId[this.modelId(t.attributes || t)] || t.cid && this._byId[t.cid]
                }, has: function (t) {
                    return null != this.get(t)
                }, at: function (t) {
                    return t < 0 && (t += this.length), this.models[t]
                }, where: function (t, e) {
                    return this[e ? "find" : "filter"](t)
                }, findWhere: function (t) {
                    return this.where(t, !0)
                }, sort: function (t) {
                    var e = this.comparator;
                    if (!e) throw new Error("Cannot sort a set without a comparator");
                    t || (t = {});
                    var i = e.length;
                    return n.isFunction(e) && (e = n.bind(e, this)), 1 === i || n.isString(e) ? this.models = this.sortBy(e) : this.models.sort(e), t.silent || this.trigger("sort", this, t), this
                }, pluck: function (t) {
                    return this.map(t + "")
                }, fetch: function (t) {
                    t = n.extend({parse: !0}, t);
                    var e = t.success, i = this;
                    return t.success = function (n) {
                        var r = t.reset ? "reset" : "set";
                        i[r](n, t), e && e.call(t.context, i, n, t), i.trigger("sync", i, n, t)
                    }, F(this, t), this.sync("read", this, t)
                }, create: function (t, e) {
                    e = e ? n.clone(e) : {};
                    var i = e.wait;
                    if (t = this._prepareModel(t, e), !t) return !1;
                    i || this.add(t, e);
                    var r = this, o = e.success;
                    return e.success = function (t, e, n) {
                        i && r.add(t, n), o && o.call(n.context, t, e, n)
                    }, t.save(null, e), t
                }, parse: function (t, e) {
                    return t
                }, clone: function () {
                    return new this.constructor(this.models, {model: this.model, comparator: this.comparator})
                }, modelId: function (t) {
                    return t[this.model.prototype.idAttribute || "id"]
                }, _reset: function () {
                    this.length = 0, this.models = [], this._byId = {}
                }, _prepareModel: function (t, e) {
                    if (this._isModel(t)) return t.collection || (t.collection = this), t;
                    e = e ? n.clone(e) : {}, e.collection = this;
                    var i = new this.model(t, e);
                    return i.validationError ? (this.trigger("invalid", this, i.validationError, e), !1) : i
                }, _removeModels: function (t, e) {
                    for (var n = [], i = 0; i < t.length; i++) {
                        var r = this.get(t[i]);
                        if (r) {
                            var o = this.indexOf(r);
                            this.models.splice(o, 1), this.length--, delete this._byId[r.cid];
                            var s = this.modelId(r.attributes);
                            null != s && delete this._byId[s], e.silent || (e.index = o, r.trigger("remove", r, this, e)), n.push(r), this._removeReference(r, e)
                        }
                    }
                    return n
                }, _isModel: function (t) {
                    return t instanceof b
                }, _addReference: function (t, e) {
                    this._byId[t.cid] = t;
                    var n = this.modelId(t.attributes);
                    null != n && (this._byId[n] = t), t.on("all", this._onModelEvent, this)
                }, _removeReference: function (t, e) {
                    delete this._byId[t.cid];
                    var n = this.modelId(t.attributes);
                    null != n && delete this._byId[n], this === t.collection && delete t.collection, t.off("all", this._onModelEvent, this)
                }, _onModelEvent: function (t, e, n, i) {
                    if (e) {
                        if (("add" === t || "remove" === t) && n !== this) return;
                        if ("destroy" === t && this.remove(e, i), "change" === t) {
                            var r = this.modelId(e.previousAttributes()), o = this.modelId(e.attributes);
                            r !== o && (null != r && delete this._byId[r], null != o && (this._byId[o] = e))
                        }
                    }
                    this.trigger.apply(this, arguments)
                }
            });
            var S = {
                forEach: 3,
                each: 3,
                map: 3,
                collect: 3,
                reduce: 0,
                foldl: 0,
                inject: 0,
                reduceRight: 0,
                foldr: 0,
                find: 3,
                detect: 3,
                filter: 3,
                select: 3,
                reject: 3,
                every: 3,
                all: 3,
                some: 3,
                any: 3,
                include: 3,
                includes: 3,
                contains: 3,
                invoke: 0,
                max: 3,
                min: 3,
                toArray: 1,
                size: 1,
                first: 3,
                head: 3,
                take: 3,
                initial: 3,
                rest: 3,
                tail: 3,
                drop: 3,
                last: 3,
                without: 0,
                difference: 0,
                indexOf: 3,
                shuffle: 1,
                lastIndexOf: 3,
                isEmpty: 1,
                chain: 1,
                sample: 3,
                partition: 3,
                groupBy: 3,
                countBy: 3,
                sortBy: 3,
                indexBy: 3,
                findIndex: 3,
                findLastIndex: 3
            };
            a(_, S, "models");
            var E = e.View = function (t) {
                    this.cid = n.uniqueId("view"), n.extend(this, n.pick(t, C)), this._ensureElement(), this.initialize.apply(this, arguments)
                }, P = /^(\S+)\s*(.*)$/,
                C = ["model", "collection", "el", "id", "attributes", "className", "tagName", "events"];
            n.extend(E.prototype, l, {
                tagName: "div", $: function (t) {
                    return this.$el.find(t)
                }, initialize: function () {
                }, render: function () {
                    return this
                }, remove: function () {
                    return this._removeElement(), this.stopListening(), this
                }, _removeElement: function () {
                    this.$el.remove()
                }, setElement: function (t) {
                    return this.undelegateEvents(), this._setElement(t), this.delegateEvents(), this
                }, _setElement: function (t) {
                    this.$el = t instanceof e.$ ? t : e.$(t), this.el = this.$el[0]
                }, delegateEvents: function (t) {
                    if (t || (t = n.result(this, "events")), !t) return this;
                    this.undelegateEvents();
                    for (var e in t) {
                        var i = t[e];
                        if (n.isFunction(i) || (i = this[i]), i) {
                            var r = e.match(P);
                            this.delegate(r[1], r[2], n.bind(i, this))
                        }
                    }
                    return this
                }, delegate: function (t, e, n) {
                    return this.$el.on(t + ".delegateEvents" + this.cid, e, n), this
                }, undelegateEvents: function () {
                    return this.$el && this.$el.off(".delegateEvents" + this.cid), this
                }, undelegate: function (t, e, n) {
                    return this.$el.off(t + ".delegateEvents" + this.cid, e, n), this
                }, _createElement: function (t) {
                    return document.createElement(t)
                }, _ensureElement: function () {
                    if (this.el) this.setElement(n.result(this, "el")); else {
                        var t = n.extend({}, n.result(this, "attributes"));
                        this.id && (t.id = n.result(this, "id")), this.className && (t.class = n.result(this, "className")), this.setElement(this._createElement(n.result(this, "tagName"))), this._setAttributes(t)
                    }
                }, _setAttributes: function (t) {
                    this.$el.attr(t)
                }
            }), e.sync = function (t, i, r) {
                var o = I[t];
                n.defaults(r || (r = {}), {emulateHTTP: e.emulateHTTP, emulateJSON: e.emulateJSON});
                var s = {type: o, dataType: "json"};
                if (r.url || (s.url = n.result(i, "url") || R()), null != r.data || !i || "create" !== t && "update" !== t && "patch" !== t || (s.contentType = "application/json", s.data = JSON.stringify(r.attrs || i.toJSON(r))), r.emulateJSON && (s.contentType = "application/x-www-form-urlencoded", s.data = s.data ? {model: s.data} : {}), r.emulateHTTP && ("PUT" === o || "DELETE" === o || "PATCH" === o)) {
                    s.type = "POST", r.emulateJSON && (s.data._method = o);
                    var a = r.beforeSend;
                    r.beforeSend = function (t) {
                        if (t.setRequestHeader("X-HTTP-Method-Override", o), a) return a.apply(this, arguments)
                    }
                }
                "GET" === s.type || r.emulateJSON || (s.processData = !1);
                var c = r.error;
                r.error = function (t, e, n) {
                    r.textStatus = e, r.errorThrown = n, c && c.call(r.context, t, e, n)
                };
                var u = r.xhr = e.ajax(n.extend(s, r));
                return i.trigger("request", i, u, r), u
            };
            var I = {create: "POST", update: "PUT", patch: "PATCH", delete: "DELETE", read: "GET"};
            e.ajax = function () {
                return e.$.ajax.apply(e.$, arguments)
            };
            var A = e.Router = function (t) {
                t || (t = {}), t.routes && (this.routes = t.routes), this._bindRoutes(), this.initialize.apply(this, arguments)
            }, M = /\((.*?)\)/g, D = /(\(\?)?:\w+/g, N = /\*\w+/g, O = /[\-{}\[\]+?.,\\\^$|#\s]/g;
            n.extend(A.prototype, l, {
                initialize: function () {
                }, route: function (t, i, r) {
                    n.isRegExp(t) || (t = this._routeToRegExp(t)), n.isFunction(i) && (r = i, i = ""), r || (r = this[i]);
                    var o = this;
                    return e.history.route(t, function (n) {
                        var s = o._extractParameters(t, n);
                        o.execute(r, s, i) !== !1 && (o.trigger.apply(o, ["route:" + i].concat(s)), o.trigger("route", i, s), e.history.trigger("route", o, i, s))
                    }), this
                }, execute: function (t, e, n) {
                    t && t.apply(this, e)
                }, navigate: function (t, n) {
                    return e.history.navigate(t, n), this
                }, _bindRoutes: function () {
                    if (this.routes) {
                        this.routes = n.result(this, "routes");
                        for (var t, e = n.keys(this.routes); null != (t = e.pop());) this.route(t, this.routes[t])
                    }
                }, _routeToRegExp: function (t) {
                    return t = t.replace(O, "\\$&").replace(M, "(?:$1)?").replace(D, function (t, e) {
                        return e ? t : "([^/?]+)"
                    }).replace(N, "([^?]*?)"), new RegExp("^" + t + "(?:\\?([\\s\\S]*))?$")
                }, _extractParameters: function (t, e) {
                    var i = t.exec(e).slice(1);
                    return n.map(i, function (t, e) {
                        return e === i.length - 1 ? t || null : t ? decodeURIComponent(t) : null
                    })
                }
            });
            var j = e.History = function () {
                this.handlers = [], this.checkUrl = n.bind(this.checkUrl, this), "undefined" != typeof window && (this.location = window.location, this.history = window.history)
            }, L = /^[#\/]|\s+$/g, z = /^\/+|\/+$/g, B = /#.*$/;
            j.started = !1, n.extend(j.prototype, l, {
                interval: 50, atRoot: function () {
                    var t = this.location.pathname.replace(/[^\/]$/, "$&/");
                    return t === this.root && !this.getSearch()
                }, matchRoot: function () {
                    var t = this.decodeFragment(this.location.pathname), e = t.slice(0, this.root.length - 1) + "/";
                    return e === this.root
                }, decodeFragment: function (t) {
                    return decodeURI(t.replace(/%25/g, "%2525"))
                }, getSearch: function () {
                    var t = this.location.href.replace(/#.*/, "").match(/\?.+/);
                    return t ? t[0] : ""
                }, getHash: function (t) {
                    var e = (t || this).location.href.match(/#(.*)$/);
                    return e ? e[1] : ""
                }, getPath: function () {
                    var t = this.decodeFragment(this.location.pathname + this.getSearch()).slice(this.root.length - 1);
                    return "/" === t.charAt(0) ? t.slice(1) : t
                }, getFragment: function (t) {
                    return null == t && (t = this._usePushState || !this._wantsHashChange ? this.getPath() : this.getHash()), t.replace(L, "")
                }, start: function (t) {
                    if (j.started) throw new Error("Backbone.history has already been started");
                    if (j.started = !0, this.options = n.extend({root: "/"}, this.options, t), this.root = this.options.root, this._wantsHashChange = this.options.hashChange !== !1, this._hasHashChange = "onhashchange" in window && (void 0 === document.documentMode || document.documentMode > 7), this._useHashChange = this._wantsHashChange && this._hasHashChange, this._wantsPushState = !!this.options.pushState, this._hasPushState = !(!this.history || !this.history.pushState), this._usePushState = this._wantsPushState && this._hasPushState, this.fragment = this.getFragment(), this.root = ("/" + this.root + "/").replace(z, "/"), this._wantsHashChange && this._wantsPushState) {
                        if (!this._hasPushState && !this.atRoot()) {
                            var e = this.root.slice(0, -1) || "/";
                            return this.location.replace(e + "#" + this.getPath()), !0
                        }
                        this._hasPushState && this.atRoot() && this.navigate(this.getHash(), {replace: !0})
                    }
                    if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) {
                        this.iframe = document.createElement("iframe"), this.iframe.src = "javascript:0", this.iframe.style.display = "none", this.iframe.tabIndex = -1;
                        var i = document.body, r = i.insertBefore(this.iframe, i.firstChild).contentWindow;
                        r.document.open(), r.document.close(), r.location.hash = "#" + this.fragment
                    }
                    var o = window.addEventListener || function (t, e) {
                        return attachEvent("on" + t, e)
                    };
                    if (this._usePushState ? o("popstate", this.checkUrl, !1) : this._useHashChange && !this.iframe ? o("hashchange", this.checkUrl, !1) : this._wantsHashChange && (this._checkUrlInterval = setInterval(this.checkUrl, this.interval)), !this.options.silent) return this.loadUrl()
                }, stop: function () {
                    var t = window.removeEventListener || function (t, e) {
                        return detachEvent("on" + t, e)
                    };
                    this._usePushState ? t("popstate", this.checkUrl, !1) : this._useHashChange && !this.iframe && t("hashchange", this.checkUrl, !1), this.iframe && (document.body.removeChild(this.iframe), this.iframe = null), this._checkUrlInterval && clearInterval(this._checkUrlInterval), j.started = !1
                }, route: function (t, e) {
                    this.handlers.unshift({route: t, callback: e})
                }, checkUrl: function (t) {
                    var e = this.getFragment();
                    return e === this.fragment && this.iframe && (e = this.getHash(this.iframe.contentWindow)), e !== this.fragment && (this.iframe && this.navigate(e), void this.loadUrl())
                }, loadUrl: function (t) {
                    return !!this.matchRoot() && (t = this.fragment = this.getFragment(t), n.some(this.handlers, function (e) {
                        if (e.route.test(t)) return e.callback(t), !0
                    }))
                }, navigate: function (t, e) {
                    if (!j.started) return !1;
                    e && e !== !0 || (e = {trigger: !!e}), t = this.getFragment(t || "");
                    var n = this.root;
                    "" !== t && "?" !== t.charAt(0) || (n = n.slice(0, -1) || "/");
                    var i = n + t;
                    if (t = this.decodeFragment(t.replace(B, "")), this.fragment !== t) {
                        if (this.fragment = t, this._usePushState) this.history[e.replace ? "replaceState" : "pushState"]({}, document.title, i); else {
                            if (!this._wantsHashChange) return this.location.assign(i);
                            if (this._updateHash(this.location, t, e.replace), this.iframe && t !== this.getHash(this.iframe.contentWindow)) {
                                var r = this.iframe.contentWindow;
                                e.replace || (r.document.open(), r.document.close()), this._updateHash(r.location, t, e.replace)
                            }
                        }
                        return e.trigger ? this.loadUrl(t) : void 0
                    }
                }, _updateHash: function (t, e, n) {
                    if (n) {
                        var i = t.href.replace(/(javascript:|#).*$/, "");
                        t.replace(i + "#" + e)
                    } else t.hash = "#" + e
                }
            }), e.history = new j;
            var q = function (t, e) {
                var i, r = this;
                return i = t && n.has(t, "constructor") ? t.constructor : function () {
                    return r.apply(this, arguments)
                }, n.extend(i, r, e), i.prototype = n.create(r.prototype, t), i.prototype.constructor = i, i.__super__ = r.prototype, i
            };
            b.extend = _.extend = A.extend = E.extend = j.extend = q;
            var R = function () {
                throw new Error('A "url" property or function must be specified')
            }, F = function (t, e) {
                var n = e.error;
                e.error = function (i) {
                    n && n.call(e.context, t, i, e), t.trigger("error", t, i, e)
                }
            };
            return e
        })
    }).call(e, function () {
        return this
    }())
}, function (t, e, n) {
    "use strict";

    function i() {
        var t = r("#go-top"), e = document.body.scrollTop || document.documentElement.scrollTop,
            n = document.documentElement.clientHeight;
        e > n ? t.show() : t.hide()
    }

    var r = n(29);
    t.exports = function () {
        i(), r(window).on("scroll", i), r("#go-top").on("touchend", function (t) {
            t.preventDefault(), window.scroll(0, 1)
        }), r("#page-nav-back").on("click", function (t) {
            t.preventDefault(), history.length ? window.history.back() : window.location.href = "//mall.meizu.com/"
        })
    }
}, function (t, e, n) {
    var i;
    !function (r) {
        "use strict";

        function o(t, e) {
            arguments.length < 1 ? t = r : c.isPlainObject(t) && (e = t, t = r);
            var n = "string" == typeof t ? a.querySelector(t) : t;
            if (n) {
                this.container = n;
                var i = {bufferHeight: 400, bufferWidth: 0, lazyOnce: !0, clazz: "be-lazy", visualWindow: r};
                e = e || {}, this.options = c.extend(i, e), this.init()
            }
        }

        var s = r.navigator.userAgent, a = r.document, c = {
            getElemRect: function (t, e) {
                if (t) {
                    e || (e = {x: 0, y: 0});
                    var n, i, o, s;
                    if (t != r) {
                        var u = t.getBoundingClientRect();
                        s = u.left, n = u.top, i = u.right, o = u.bottom
                    } else s = 0, n = 0, i = s + t.innerWidth, o = n + t.innerHeight, c.isIE() && c.lteIE(8) && (i = s + a.documentElement.clientWidth, o = n + a.documentElement.clientHeight);
                    return {left: s, top: n, right: i + e.x, bottom: o + e.y}
                }
            }, addEvent: function (t, e, n) {
                window.addEventListener ? t.addEventListener(e, n, !1) : "object" == typeof n && n.handleEvent ? t.attachEvent("on" + e, function () {
                    n.handleEvent.call(n)
                }) : t.attachEvent("on" + e, n)
            }, removeEvent: function (t, e, n) {
                window.addEventListener ? t.removeEventListener(e, n, !1) : t.detachEvent("on" + e, n)
            }, removeClass: function (t, e) {
                var n, i = t.className;
                n = i.indexOf(" " + e) >= 0 ? new RegExp(" " + e) : i.indexOf(e + " ") >= 0 ? new RegExp(e + " ") : new RegExp(e), t.className = i.replace(n, "")
            }, isOverlap: function (t, e) {
                var n = e.right > t.left && e.left < t.right, i = e.bottom > t.top && e.top < t.bottom;
                return n && i
            }, filter: function (t) {
                if (Array.prototype.filter) return t.filter(function (t) {
                    return !!t
                });
                for (var e = [], n = 0, i = t.length; n < i; n++) t[n] && e.push(t[n]);
                return e
            }, extend: function (t, e) {
                for (var n in e) t[n] = e[n];
                return t
            }, isPlainObject: function (t) {
                return "object" == typeof t && Object.getPrototypeOf(t) === Object.prototype
            }, isMobile: function () {
                navigator.appVersion.match(/(iPhone\sOS)\s([\d_]+)/), navigator.appVersion.match(/(Android)\s([\d\.]+)/);
                return !!/iPhone|iPad|Android/.test(navigator.appVersion)
            }, isIE: function (t) {
                var e = /Trident/;
                if (void 0 !== t) {
                    var n = this.isIE, i = document.documentMode;
                    return n && (void 0 === i || i === t)
                }
                return e.test(s)
            }, lteIE: function (t) {
                var e = this.isIE, n = document.documentMode;
                return e && (void 0 === n || n <= t)
            }
        };
        c.extend(o.prototype, {
            init: function () {
                this.getLazyItems(), this.bindEvent(), this.careItems()
            }, handleEvent: function (t) {
                t = t || window.event;
                var e = t.type;
                "scroll" !== e && "touchend" !== e || this.careItems()
            }, getOption: function (t) {
                return t ? this.options[t] : null
            }, getLazyItems: function () {
                var t = this.container;
                t = t === r ? a : t;
                for (var e = t.querySelectorAll("." + this.getOption("clazz")), n = [], i = 0, o = e.length; i < o; i++) n.push(e[i]);
                this.lazyItems = n
            }, bindEvent: function () {
                var t = this.getOption("visualWindow");
                c.addEvent(t, "scroll", this), c.isMobile && (c.addEvent(t, "touchstart", this), c.addEvent(t, "touchend", this))
            }, destroy: function () {
                c.removeEvent(this.getOption("visualWindow"), "scroll", this)
            }, careItems: function () {
                var t = this, e = (this.container, this.lazyItems),
                    n = {x: this.getOption("bufferWidth"), y: this.getOption("bufferHeight")}, i = e.length,
                    r = c.getElemRect, o = c.filter(this.lazyItems);
                if (o && o.length) for (var s = 0; s < i; s++) {
                    var a = e[s];
                    a && c.isOverlap(r(t.getOption("visualWindow"), n), r(a)) && t.fetchItem(a, s)
                } else t.getOption("lazyOnce") && t.destroy()
            }, fetchItem: function (t, e) {
                var n = this, i = t.getAttribute("data-src");
                i && "" !== i && (t.src = i, n.removeLazyItem(t, e), t.onload || (t.onload = function () {
                    n.getOption("loadComplete") && n.getOption("loadComplete").call(t)
                }, t.onerror = function () {
                    n.getOption("loadError") && n.getOption("loadError").call(t)
                }))
            }, removeLazyItem: function (t, e) {
                c.removeClass(t, this.getOption("clazz")), t.removeAttribute("data-src"), t.onload = t.onerror = null, this.lazyItems[e] = null
            }
        }), r.Lazyload = o, "undefined" != typeof t && t.exports ? t.exports = o : (n(34).cmd || n(35)) && (i = function (t, e, n) {
            return o
        }.call(e, n, e, t), !(void 0 !== i && (t.exports = i)))
    }(window)
}, function (t, e) {
    t.exports = function () {
        throw new Error("define cannot be used indirect")
    }
}, function (t, e) {
    (function (e) {
        t.exports = e
    }).call(e, {})
}, function (t, e, n) {
    "use strict";
    var i = n(29), r = n(37), o = {insetBefore: "#header", expire: 86400}, s = {
        init: function (t) {
            var e = i.extend({}, o, t || {});
            this.options = e, this.$insetBefore = i(e.insetBefore), void 0 === r.getCookie("appbnr_invisible") && this.getData()
        }, getData: function () {
            var t = this;
            i.ajax({url: "//mall.meizu.com/app/download/url", dataType: "jsonp"}).done(function (e) {
                e.success && t.renderBnr(e.data)
            })
        }, renderBnr: function (t) {
            var e = this.options, n = this.$insetBefore, o = i('<div id="topbnr-dl-app" class="topbnr-dl-app"/>');
            o.html('<a class="bnr-close"></a><a data-mtype="download" class="bnr-link" href="' + t.downloadUrl + '"><img src="' + t.imgUrl + '"/></a>'), n.length ? n.before(o) : i("body").prepend(o), "function" == typeof e.show && e.show(), o.find(".bnr-close").on("click", function (t) {
                "function" == typeof e.remove && e.remove(), o.remove(), r.setCookie("appbnr_invisible", +new Date, e.expire)
            })
        }
    };
    window._AppDownload = s, t.exports = {
        init: function (t) {
            s.init(t)
        }
    }
}, function (t, e) {
    "use strict";

    function n(t) {
        if (t) {
            var e = t.find("[name]"), n = {};
            return e.each(function (t, e) {
                "" !== e.name && (n[e.name] = e.value)
            }), n
        }
    }

    function i(t) {
        for (var e, n = document.cookie ? document.cookie.split(/;[ ]*/) : [], i = 0, r = n.length; i < r; i++) {
            var o = n[i].split("=");
            if (t && t == decodeURIComponent(o[0])) {
                e = decodeURIComponent(o[1]);
                break
            }
        }
        return e
    }

    function r(t, e, n) {
        if (t) {
            var i = e;
            "object" == typeof e && (i = JSON.stringify(e));
            var r = new Date, n = n || 86400;
            r.setTime(r.getTime() + 1e3 * n), document.cookie = t + "=" + encodeURI(i) + "; expires=" + r.toGMTString()
        }
    }

    function o(t, e, n) {
        if (t) {
            var i = e;
            "object" == typeof e && (i = JSON.stringify(e));
            var r = new Date, n = n || 86400;
            r.setTime(r.getTime() + 1e3 * n), document.cookie = t + "=" + encodeURI(i) + "; expires=" + r.toGMTString() + "; path=/"
        }
    }

    function s(t) {
        var e = new Date;
        e.setTime(e.getTime() - 1e3);
        var n = i(t);
        null !== n && (document.cookie = t + "=" + encodeURI(n) + "; expires=" + e.toGMTString())
    }

    function a(t) {
        var e = new Date;
        e.setTime(e.getTime() - 1e3);
        var n = i(t);
        null !== n && (document.cookie = t + "=" + encodeURI(n) + "; expires=" + e.toGMTString() + "; path=/")
    }

    function c(t) {
        var e = window.location.search;
        e = e.slice(1);
        var n, i = e.split("&");
        return $.each(i, function (e, i) {
            var r = i.split("=");
            if (r[0] === t) return void(n = r[1])
        }), n
    }

    function u(t) {
        var e, n = {};
        return "" === t ? n : (e = t.split("&"), $.each(e, function (t, e) {
            var i = e.split("=");
            n[i[0]] = decodeURIComponent(i[1])
        }), n)
    }

    function l(t) {
        var e = [];
        for (var n in t) e.push(n + "=" + t[n]);
        return e.join("&")
    }

    function h(t) {
        var e = navigator.userAgent, n = new RegExp(t);
        return !!n.test(e)
    }

    function d(t) {
        var e;
        for (e in t) return !1;
        return !0
    }

    function p(t) {
        $.ajax({
            url: "/independent", type: "get", dataType: "json", cache: !1, success: function (e, n, i) {
                var r = i.getResponseHeader("X-CSRF-TOKEN");
                t && t(r)
            }
        })
    }

    var f = function () {
        var t = $(['<div id="loading" class="loading"><div class="inner">', '<div class="panel">', '<div class="tick-tock">', '<span class="t1"></span><span class="t2"></span>', '<span class="t3"></span><span class="t4"></span>', '<span class="t5"></span><span class="t6"></span>', '<span class="t7"></span><span class="t8"></span>', '<span class="t9"></span><span class="t10"></span>', '<span class="t11"></span><span class="t12"></span>', "</div>", '<div class="txt">请稍候...</div>', "</div>", "</div></div>"].join("")),
            e = function () {
                t.appendTo("body")
            }, n = function () {
                t.remove()
            };
        return {start: e, stop: n}
    }();
    t.exports = {
        load: f,
        uaTester: h,
        formDateToMap: n,
        getCookie: i,
        setCookie: r,
        setCookiePath: o,
        delCookie: s,
        delCookiePaht: a,
        getUrlQuery: c,
        queryToMap: u,
        mapToQuery: l,
        isEmptyObj: d,
        getcsrf: p
    }
}, function (t, e) {
    function n(t) {
        var e = [];
        for (var n in t) e.push(n + "=" + t[n]);
        return e.join("&")
    }

    function i(t, e) {
        var i = navigator.userAgent, r = !!i.match(/Android/), o = !!i.match(/MzmApp/),
            s = !!i.match(/MicroMessenger/i), t = (i.match(/Version\/\d+\.\d+(\.\d+)?\sChrome\//i), t || "main"),
            a = "", c = "", u = "";
        void 0 !== e && (c = e.adfrom || "", u = e.from || "");
        var l = {adfrom: c, from: u};
        switch (t) {
            case"detail":
                e.skuId ? (l.type = 2, l.id = e.itemNumber, l.skuid = e.skuId) : (l.type = 1, l.id = e.itemId);
                break;
            case"activity":
                l.url = encodeURIComponent(e.url), e.refresh && (l.refresh = e.refresh)
        }
        var a = "mzstore://mall/" + t + "?" + n(l);
        if (r && !s && !o) {
            var h = document.createElement("iframe");
            h.src = a, h.style.display = "none", document.body.appendChild(h), setTimeout(function () {
                document.body.removeChild(h)
            }, 2e3)
        }
    }

    t.exports = i
}, function (t, e, n) {
    function i(t) {
        var e = navigator.userAgent, n = new RegExp(t, "i"), i = e.match(n);
        return !!i
    }

    function r(t, e) {
        o.ajax({
            url: "//mall.meizu.com/member/mplus_login",
            type: "get",
            data: {token: t, source: "h5_media"},
            dataType: "jsonp"
        }).done(function (t) {
            e && e(t)
        })
    }

    var o = n(29), s = n(40);
    t.exports = function (t) {
        i("com.meizu.media.music") && s(function (e) {
            e && r(e, t)
        })
    }
}, function (t, e) {
    window.FlymeJS = {
        callback: {}, invokeWeb: function (t, e) {
            e = JSON.parse(e), this.callback[e.res_sn](e.value)
        }
    };
    var n = "cb_getusertoken", i = function (t) {
        var e = document.createElement("iframe"), i = {force: !1};
        e.setAttribute("src", "flyme://com.meizu.compaign.hybrid.handler.AccountUrlHandler/requestToken?value=" + JSON.stringify(i) + "&req_sn=" + n), setTimeout(function () {
            e.parentNode.removeChild(e)
        }, 100), document.body.appendChild(e), window.FlymeJS.callback[n] = t
    };
    t.exports = i
}, function (t, e, n) {
    var i;
    !function () {
        "use strict";

        /**
         * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
         *
         * @codingstandard ftlabs-jsv2
         * @copyright The Financial Times Limited [All Rights Reserved]
         * @license MIT License (see LICENSE.txt)
         */
        function r(t, e) {
            function n(t, e) {
                return function () {
                    return t.apply(e, arguments)
                }
            }

            var i;
            if (e = e || {}, this.trackingClick = !1, this.trackingClickStart = 0, this.targetElement = null, this.touchStartX = 0, this.touchStartY = 0, this.lastTouchIdentifier = 0, this.touchBoundary = e.touchBoundary || 10, this.layer = t, this.tapDelay = e.tapDelay || 200, this.tapTimeout = e.tapTimeout || 700, !r.notNeeded(t)) {
                for (var o = ["onMouse", "onClick", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel"], a = this, c = 0, u = o.length; c < u; c++) a[o[c]] = n(a[o[c]], a);
                s && (t.addEventListener("mouseover", this.onMouse, !0), t.addEventListener("mousedown", this.onMouse, !0), t.addEventListener("mouseup", this.onMouse, !0)), t.addEventListener("click", this.onClick, !0), t.addEventListener("touchstart", this.onTouchStart, !1), t.addEventListener("touchmove", this.onTouchMove, !1), t.addEventListener("touchend", this.onTouchEnd, !1), t.addEventListener("touchcancel", this.onTouchCancel, !1), Event.prototype.stopImmediatePropagation || (t.removeEventListener = function (e, n, i) {
                    var r = Node.prototype.removeEventListener;
                    "click" === e ? r.call(t, e, n.hijacked || n, i) : r.call(t, e, n, i)
                }, t.addEventListener = function (e, n, i) {
                    var r = Node.prototype.addEventListener;
                    "click" === e ? r.call(t, e, n.hijacked || (n.hijacked = function (t) {
                        t.propagationStopped || n(t)
                    }), i) : r.call(t, e, n, i)
                }), "function" == typeof t.onclick && (i = t.onclick, t.addEventListener("click", function (t) {
                    i(t)
                }, !1), t.onclick = null)
            }
        }

        var o = navigator.userAgent.indexOf("Windows Phone") >= 0, s = navigator.userAgent.indexOf("Android") > 0 && !o,
            a = /iP(ad|hone|od)/.test(navigator.userAgent) && !o, c = a && /OS 4_\d(_\d)?/.test(navigator.userAgent),
            u = a && /OS [6-7]_\d/.test(navigator.userAgent), l = navigator.userAgent.indexOf("BB10") > 0;
        r.prototype.needsClick = function (t) {
            switch (t.nodeName.toLowerCase()) {
                case"button":
                case"select":
                case"textarea":
                    if (t.disabled) return !0;
                    break;
                case"input":
                    if (a && "file" === t.type || t.disabled) return !0;
                    break;
                case"label":
                case"iframe":
                case"video":
                    return !0
            }
            return /\bneedsclick\b/.test(t.className)
        }, r.prototype.needsFocus = function (t) {
            switch (t.nodeName.toLowerCase()) {
                case"textarea":
                    return !0;
                case"select":
                    return !s;
                case"input":
                    switch (t.type) {
                        case"button":
                        case"checkbox":
                        case"file":
                        case"image":
                        case"radio":
                        case"submit":
                            return !1
                    }
                    return !t.disabled && !t.readOnly;
                default:
                    return /\bneedsfocus\b/.test(t.className)
            }
        }, r.prototype.sendClick = function (t, e) {
            var n, i;
            document.activeElement && document.activeElement !== t && document.activeElement.blur(), i = e.changedTouches[0], n = document.createEvent("MouseEvents"), n.initMouseEvent(this.determineEventType(t), !0, !0, window, 1, i.screenX, i.screenY, i.clientX, i.clientY, !1, !1, !1, !1, 0, null), n.forwardedTouchEvent = !0, t.dispatchEvent(n)
        }, r.prototype.determineEventType = function (t) {
            return s && "select" === t.tagName.toLowerCase() ? "mousedown" : "click"
        }, r.prototype.focus = function (t) {
            var e;
            a && t.setSelectionRange && 0 !== t.type.indexOf("date") && "time" !== t.type && "month" !== t.type ? (e = t.value.length, t.setSelectionRange(e, e)) : t.focus()
        }, r.prototype.updateScrollParent = function (t) {
            var e, n;
            if (e = t.fastClickScrollParent, !e || !e.contains(t)) {
                n = t;
                do {
                    if (n.scrollHeight > n.offsetHeight) {
                        e = n, t.fastClickScrollParent = n;
                        break
                    }
                    n = n.parentElement
                } while (n)
            }
            e && (e.fastClickLastScrollTop = e.scrollTop)
        }, r.prototype.getTargetElementFromEventTarget = function (t) {
            return t.nodeType === Node.TEXT_NODE ? t.parentNode : t
        }, r.prototype.onTouchStart = function (t) {
            var e, n, i;
            if (t.targetTouches.length > 1) return !0;
            if (e = this.getTargetElementFromEventTarget(t.target), n = t.targetTouches[0], a) {
                if (i = window.getSelection(), i.rangeCount && !i.isCollapsed) return !0;
                if (!c) {
                    if (n.identifier && n.identifier === this.lastTouchIdentifier) return t.preventDefault(), !1;
                    this.lastTouchIdentifier = n.identifier, this.updateScrollParent(e)
                }
            }
            return this.trackingClick = !0, this.trackingClickStart = t.timeStamp, this.targetElement = e, this.touchStartX = n.pageX, this.touchStartY = n.pageY, t.timeStamp - this.lastClickTime < this.tapDelay && t.preventDefault(), !0
        }, r.prototype.touchHasMoved = function (t) {
            var e = t.changedTouches[0], n = this.touchBoundary;
            return Math.abs(e.pageX - this.touchStartX) > n || Math.abs(e.pageY - this.touchStartY) > n
        }, r.prototype.onTouchMove = function (t) {
            return !this.trackingClick || ((this.targetElement !== this.getTargetElementFromEventTarget(t.target) || this.touchHasMoved(t)) && (this.trackingClick = !1, this.targetElement = null), !0)
        }, r.prototype.findControl = function (t) {
            return void 0 !== t.control ? t.control : t.htmlFor ? document.getElementById(t.htmlFor) : t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")
        }, r.prototype.onTouchEnd = function (t) {
            var e, n, i, r, o, l = this.targetElement;
            if (!this.trackingClick) return !0;
            if (t.timeStamp - this.lastClickTime < this.tapDelay) return this.cancelNextClick = !0, !0;
            if (t.timeStamp - this.trackingClickStart > this.tapTimeout) return !0;
            if (this.cancelNextClick = !1, this.lastClickTime = t.timeStamp, n = this.trackingClickStart, this.trackingClick = !1, this.trackingClickStart = 0, u && (o = t.changedTouches[0], l = document.elementFromPoint(o.pageX - window.pageXOffset, o.pageY - window.pageYOffset) || l, l.fastClickScrollParent = this.targetElement.fastClickScrollParent), i = l.tagName.toLowerCase(), "label" === i) {
                if (e = this.findControl(l)) {
                    if (this.focus(l), s) return !1;
                    l = e
                }
            } else if (this.needsFocus(l)) return t.timeStamp - n > 100 || a && window.top !== window && "input" === i ? (this.targetElement = null, !1) : (this.focus(l), this.sendClick(l, t), a && "select" === i || (this.targetElement = null, t.preventDefault()), !1);
            return !(!a || c || (r = l.fastClickScrollParent, !r || r.fastClickLastScrollTop === r.scrollTop)) || (this.needsClick(l) || (t.preventDefault(), this.sendClick(l, t)), !1)
        }, r.prototype.onTouchCancel = function () {
            this.trackingClick = !1, this.targetElement = null
        }, r.prototype.onMouse = function (t) {
            return !this.targetElement || (!!t.forwardedTouchEvent || (!t.cancelable || (!(!this.needsClick(this.targetElement) || this.cancelNextClick) || (t.stopImmediatePropagation ? t.stopImmediatePropagation() : t.propagationStopped = !0, t.stopPropagation(), t.preventDefault(), !1))))
        }, r.prototype.onClick = function (t) {
            var e;
            return this.trackingClick ? (this.targetElement = null, this.trackingClick = !1, !0) : "submit" === t.target.type && 0 === t.detail || (e = this.onMouse(t), e || (this.targetElement = null), e)
        }, r.prototype.destroy = function () {
            var t = this.layer;
            s && (t.removeEventListener("mouseover", this.onMouse, !0), t.removeEventListener("mousedown", this.onMouse, !0), t.removeEventListener("mouseup", this.onMouse, !0)), t.removeEventListener("click", this.onClick, !0), t.removeEventListener("touchstart", this.onTouchStart, !1), t.removeEventListener("touchmove", this.onTouchMove, !1), t.removeEventListener("touchend", this.onTouchEnd, !1), t.removeEventListener("touchcancel", this.onTouchCancel, !1)
        }, r.notNeeded = function (t) {
            var e, n, i, r;
            if ("undefined" == typeof window.ontouchstart) return !0;
            if (n = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1]) {
                if (!s) return !0;
                if (e = document.querySelector("meta[name=viewport]")) {
                    if (e.content.indexOf("user-scalable=no") !== -1) return !0;
                    if (n > 31 && document.documentElement.scrollWidth <= window.outerWidth) return !0
                }
            }
            if (l && (i = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/), i[1] >= 10 && i[2] >= 3 && (e = document.querySelector("meta[name=viewport]")))) {
                if (e.content.indexOf("user-scalable=no") !== -1) return !0;
                if (document.documentElement.scrollWidth <= window.outerWidth) return !0
            }
            return "none" === t.style.msTouchAction || "manipulation" === t.style.touchAction || (r = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1], !!(r >= 27 && (e = document.querySelector("meta[name=viewport]"), e && (e.content.indexOf("user-scalable=no") !== -1 || document.documentElement.scrollWidth <= window.outerWidth))) || ("none" === t.style.touchAction || "manipulation" === t.style.touchAction))
        }, r.attach = function (t, e) {
            return new r(t, e)
        }, window.FastClick = r, "undefined" != typeof t && t.exports ? t.exports = r : (n(34).cmd || n(35)) && (i = function (t, e, n) {
            return r
        }.call(e, n, e, t), !(void 0 !== i && (t.exports = i)))
    }()
}, function (t, e, n) {
    function i(t, e) {
        return this.$container = t, this.options = e, this.firstTouch = {}, this.touch = {
            x1: 0,
            x2: 0,
            y1: 0,
            y2: 0
        }, this.distance = {w: 0, h: 0}, this.threshold = 10, this.additionalEvent = "", this.init(), this.$container
    }

    function r() {
        c.init()
    }

    /*!
	 * touch-layout.js
	 * @date 2016.3.15
	 * @author chenjinghui@meizu.com
	 * @version 0.0.1
	 */
    var o = n(29), s = n(43), a = {
        win: o(window),
        body: o("body"),
        main: o("#main"),
        header: o("#header"),
        headerOpacity: o("#headerOpacity"),
        content: o("#content"),
        tab: o("#contentNav"),
        prod: o("#prod"),
        contentInner: o("#contentInner"),
        description: o("#description"),
        standard: o("#standard"),
        question: o("#question")
    };
    i.prototype = {
        init: function () {
            var t = this;
            t.$container[0].addEventListener("touchstart", t.touchStartHandle.bind(t), !1), t.$container[0].addEventListener("touchmove", t.touchMoveHandle.bind(t), !1), t.$container[0].addEventListener("touchend", t.touchEndHandle.bind(t), !1), t.$container[0].addEventListener("touchcancel", t.touchEndHandle.bind(t), !1)
        }, touchStartHandle: function (t) {
            var e, n = this;
            n.touch = {}, n.distance = {}, n.firstTouch = t.touches[0], t.touches && 1 === t.touches.length && n.touch.y2 && (n.touch.x2 = void 0, n.touch.y2 = void 0), n.touch.x1 = n.firstTouch.pageX, n.touch.y1 = n.firstTouch.pageY, e = o.Event("swipeStart", {coord: n.touch}), n.$container.trigger(e)
        }, touchMoveHandle: function (t) {
            var e = this;
            e.firstTouch = t.touches[0], e.touch.x2 = e.firstTouch.pageX, e.touch.y2 = e.firstTouch.pageY, e.distance.w = e.touch.x2 - e.touch.x1, e.distance.h = e.touch.y2 - e.touch.y1, e.recognizer(t)
        }, touchEndHandle: function (t) {
            var e, n = this;
            n.distance.w = n.touch.x2 - n.touch.x1, n.distance.h = n.touch.y2 - n.touch.y1, e = o.Event("swipeEnd", {
                coord: n.touch,
                distance: Math.abs(n.distance.h),
                deltaX: n.distance.w,
                deltaY: n.distance.h,
                additionalEvent: n.additionalEvent,
                angle: n.getAngle(n.touch)
            }), n.$container.trigger(e)
        }, getAngle: function (t) {
            var e, n = t.x2 - t.x1, i = t.y2 - t.y1, r = Math.sqrt(Math.abs(n * n) + Math.abs(i * i));
            return e = Math.round(Math.asin(i / r) / Math.PI * 180)
        }, isScrollBottom: function () {
            var t = !1, e = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop,
                n = window.innerHeight || document.body.clientHeight,
                i = document.body.scrollHeight || document.documentElement.scrollHeight;
            return i - n === e && (t = !0), t
        }, recognizer: function (t) {
            var e = this, n = e.options.recognizer, i = /UCBrowser/.test(navigator.userAgent), r = {
                up: function () {
                    if (e.isScrollBottom() && e.distance.h < -e.threshold && (i || Math.abs(e.distance.h / e.distance.w) > 1.5)) {
                        var n = o.Event("swipeUp", {
                            coord: e.touch,
                            distance: Math.abs(e.distance.h),
                            deltaX: e.distance.w,
                            deltaY: e.distance.h,
                            angle: e.getAngle(e.touch)
                        });
                        e.$container.trigger(n), e.additionalEvent = "swipeUp", t.stopPropagation()
                    }
                }, down: function () {
                    if (!((window.pageYOffset || window.scrollY) > 1) && e.distance.h > e.threshold && (i || Math.abs(e.distance.h / e.distance.w) > 1.5)) {
                        var n = o.Event("swipeDown", {
                            coord: e.touch,
                            distance: Math.abs(e.distance.h),
                            deltaX: e.distance.w,
                            deltaY: e.distance.h,
                            angle: e.getAngle(e.touch)
                        });
                        e.$container.trigger(n), e.additionalEvent = "swipeDown", t.stopPropagation()
                    }
                }
            };
            n.forEach(function (t) {
                r[t] && r[t]()
            })
        }
    };
    var c = {
        prop: {
            isUC: /UCBrowser/.test(navigator.userAgent.toLowerCase()),
            isWeixin: /micromessenger/.test(navigator.userAgent.toLowerCase()),
            isMZ: /mz\-/.test(navigator.userAgent.toLowerCase())
        }, state: {count: 0}, init: function (t) {
            var e = this;
            e.state.count = a.contentInner.children().length, a.contentInner.children().eq(0).addClass("active").css("height", "auto").siblings().removeClass("active"), e.bindEvent(), e.headerOpacityCtrl(), e.fixedContentNav(), e.activePanel(0, !0)
        }, headerOpacityCtrl: function () {
            var t = a.prod.position().top;
            a.headerOpacity.height();
            a.win.on("scroll.opacity", function () {
                var e = a.win.scrollTop(), n = o("#topbnr-dl-app");
                e >= 10 ? (n.hide(), a.body.css("padding-top", 0)) : e < 5 && n.length && (n.show(), a.body.css("padding-top", a.headerOpacity.height())), a.headerOpacity.css("opacity", Math.min(e / t, 1))
            })
        }, fixedContentNav: function () {
            var t = o("#contentNav").height();
            o("#headerOpacityTitle");
            a.win.on("scroll.contentNav", function () {
                var e = a.win.scrollTop() + t, n = a.content.position().top;
                e >= n ? a.tab.addClass("fixed") : a.tab.removeClass("fixed")
            })
        }, bindEvent: function () {
            var t = this, e = a.contentInner.width();
            a.tab.children("a").on("click", function (n) {
                n.preventDefault();
                var i = o(n.currentTarget), r = i.index(), s = -(r * e);
                a.contentInner.css({
                    transform: "translateX(" + s + "px)",
                    "-webkit-transform": "translateX(" + s + "px)"
                }), t.activePanel(r)
            }), a.contentInner.children().each(function (e) {
                t.panHandler(new s(this, {threshold: 30}), e)
            })
        }, activePanel: function (t, e) {
            var n, i = a.header.height(), r = window.innerHeight - a.header.height();
            a.tab.children().eq(t).addClass("active").siblings().removeClass("active"), a.contentInner.children().eq(t).addClass("active").css("height", "auto").siblings().removeClass("active").css("height", r - 2 * i), e || (n = a.content.position().top - i + 10, window.scrollTo(0, Math.floor(n)))
        }, panHandler: function (t, e) {
            var n = this, i = a.contentInner.width(), r = -(e * i);
            t.on("panleft", function (t) {
                e !== n.state.count - 1 && (Math.abs(t.deltaX / t.deltaY) < 1.5 || a.contentInner.css({
                    transform: "translateX(" + (r - t.distance) + "px)",
                    "-webkit-transform": "translateX(" + (r - t.distance) + "px)"
                }))
            }).on("panright", function (t) {
                0 !== e && (Math.abs(t.deltaX / t.deltaY) < 1.5 || a.contentInner.css({
                    transform: "translateX(" + (r + t.distance) + "px)",
                    "-webkit-transform": "translateX(" + (r + t.distance) + "px)"
                }))
            }).on("panend pancancel", function (t) {
                var o, s, c = Math.abs(t.deltaX / t.deltaY) > 1.5, u = Math.abs(t.angle) > 90;
                if (Math.abs(t.distance) >= 70 && c) {
                    if (!u && 0 === e) return;
                    if (u && e === n.state.count - 1) return;
                    o = u ? e + 1 : e - 1, s = u ? r - i : r + i, a.contentInner.css({
                        transform: "translateX(" + s + "px)",
                        "-webkit-transform": "translateX(" + s + "px)"
                    }), n.activePanel(o)
                } else a.contentInner.css({
                    transform: "translateX(" + r + "px)",
                    "-webkit-transform": "translateX(" + r + "px)"
                });
                return !0
            })
        }
    };
    t.exports = r
}, function (t, e, n) {
    var i;
    /*! Hammer.JS - v2.0.6 - 2015-12-23
	 * http://hammerjs.github.io/
	 *
	 * Copyright (c) 2015 Jorik Tangelder;
	 * Licensed under the  license */
    !function (r, o, s, a) {
        "use strict";

        function c(t, e, n) {
            return setTimeout(p(t, n), e)
        }

        function u(t, e, n) {
            return !!Array.isArray(t) && (l(t, n[e], n), !0)
        }

        function l(t, e, n) {
            var i;
            if (t) if (t.forEach) t.forEach(e, n); else if (t.length !== a) for (i = 0; i < t.length;) e.call(n, t[i], i, t), i++; else for (i in t) t.hasOwnProperty(i) && e.call(n, t[i], i, t)
        }

        function h(t, e, n) {
            var i = "DEPRECATED METHOD: " + e + "\n" + n + " AT \n";
            return function () {
                var e = new Error("get-stack-trace"),
                    n = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, "").replace(/^\s+at\s+/gm, "").replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@") : "Unknown Stack Trace",
                    o = r.console && (r.console.warn || r.console.log);
                return o && o.call(r.console, i, n), t.apply(this, arguments)
            }
        }

        function d(t, e, n) {
            var i, r = e.prototype;
            i = t.prototype = Object.create(r), i.constructor = t, i._super = r, n && ht(i, n)
        }

        function p(t, e) {
            return function () {
                return t.apply(e, arguments)
            }
        }

        function f(t, e) {
            return typeof t == ft ? t.apply(e ? e[0] || a : a, e) : t
        }

        function v(t, e) {
            return t === a ? e : t
        }

        function m(t, e, n) {
            l(w(e), function (e) {
                t.addEventListener(e, n, !1)
            })
        }

        function g(t, e, n) {
            l(w(e), function (e) {
                t.removeEventListener(e, n, !1)
            })
        }

        function y(t, e) {
            for (; t;) {
                if (t == e) return !0;
                t = t.parentNode
            }
            return !1
        }

        function b(t, e) {
            return t.indexOf(e) > -1
        }

        function w(t) {
            return t.trim().split(/\s+/g)
        }

        function _(t, e, n) {
            if (t.indexOf && !n) return t.indexOf(e);
            for (var i = 0; i < t.length;) {
                if (n && t[i][n] == e || !n && t[i] === e) return i;
                i++
            }
            return -1
        }

        function k(t) {
            return Array.prototype.slice.call(t, 0)
        }

        function x(t, e, n) {
            for (var i = [], r = [], o = 0; o < t.length;) {
                var s = e ? t[o][e] : t[o];
                _(r, s) < 0 && i.push(t[o]), r[o] = s, o++
            }
            return n && (i = e ? i.sort(function (t, n) {
                return t[e] > n[e]
            }) : i.sort()), i
        }

        function T(t, e) {
            for (var n, i, r = e[0].toUpperCase() + e.slice(1), o = 0; o < dt.length;) {
                if (n = dt[o], i = n ? n + r : e, i in t) return i;
                o++
            }
            return a
        }

        function S() {
            return wt++
        }

        function E(t) {
            var e = t.ownerDocument || t;
            return e.defaultView || e.parentWindow || r
        }

        function P(t, e) {
            var n = this;
            this.manager = t, this.callback = e, this.element = t.element, this.target = t.options.inputTarget, this.domHandler = function (e) {
                f(t.options.enable, [t]) && n.handler(e)
            }, this.init()
        }

        function C(t) {
            var e, n = t.options.inputClass;
            return new (e = n ? n : xt ? H : Tt ? $ : kt ? U : F)(t, I)
        }

        function I(t, e, n) {
            var i = n.pointers.length, r = n.changedPointers.length, o = e & At && i - r === 0,
                s = e & (Dt | Nt) && i - r === 0;
            n.isFirst = !!o, n.isFinal = !!s, o && (t.session = {}), n.eventType = e, A(t, n), t.emit("hammer.input", n), t.recognize(n), t.session.prevInput = n
        }

        function A(t, e) {
            var n = t.session, i = e.pointers, r = i.length;
            n.firstInput || (n.firstInput = N(e)), r > 1 && !n.firstMultiple ? n.firstMultiple = N(e) : 1 === r && (n.firstMultiple = !1);
            var o = n.firstInput, s = n.firstMultiple, a = s ? s.center : o.center, c = e.center = O(i);
            e.timeStamp = gt(), e.deltaTime = e.timeStamp - o.timeStamp, e.angle = B(a, c), e.distance = z(a, c), M(n, e), e.offsetDirection = L(e.deltaX, e.deltaY);
            var u = j(e.deltaTime, e.deltaX, e.deltaY);
            e.overallVelocityX = u.x, e.overallVelocityY = u.y, e.overallVelocity = mt(u.x) > mt(u.y) ? u.x : u.y, e.scale = s ? R(s.pointers, i) : 1, e.rotation = s ? q(s.pointers, i) : 0, e.maxPointers = n.prevInput ? e.pointers.length > n.prevInput.maxPointers ? e.pointers.length : n.prevInput.maxPointers : e.pointers.length, D(n, e);
            var l = t.element;
            y(e.srcEvent.target, l) && (l = e.srcEvent.target), e.target = l
        }

        function M(t, e) {
            var n = e.center, i = t.offsetDelta || {}, r = t.prevDelta || {}, o = t.prevInput || {};
            (e.eventType === At || o.eventType === Dt) && (r = t.prevDelta = {
                x: o.deltaX || 0,
                y: o.deltaY || 0
            }, i = t.offsetDelta = {x: n.x, y: n.y}), e.deltaX = r.x + (n.x - i.x), e.deltaY = r.y + (n.y - i.y)
        }

        function D(t, e) {
            var n, i, r, o, s = t.lastInterval || e, c = e.timeStamp - s.timeStamp;
            if (e.eventType != Nt && (c > It || s.velocity === a)) {
                var u = e.deltaX - s.deltaX, l = e.deltaY - s.deltaY, h = j(c, u, l);
                i = h.x, r = h.y, n = mt(h.x) > mt(h.y) ? h.x : h.y, o = L(u, l), t.lastInterval = e
            } else n = s.velocity, i = s.velocityX, r = s.velocityY, o = s.direction;
            e.velocity = n, e.velocityX = i, e.velocityY = r, e.direction = o
        }

        function N(t) {
            for (var e = [], n = 0; n < t.pointers.length;) e[n] = {
                clientX: vt(t.pointers[n].clientX),
                clientY: vt(t.pointers[n].clientY)
            }, n++;
            return {timeStamp: gt(), pointers: e, center: O(e), deltaX: t.deltaX, deltaY: t.deltaY}
        }

        function O(t) {
            var e = t.length;
            if (1 === e) return {x: vt(t[0].clientX), y: vt(t[0].clientY)};
            for (var n = 0, i = 0, r = 0; e > r;) n += t[r].clientX, i += t[r].clientY, r++;
            return {x: vt(n / e), y: vt(i / e)}
        }

        function j(t, e, n) {
            return {x: e / t || 0, y: n / t || 0}
        }

        function L(t, e) {
            return t === e ? Ot : mt(t) >= mt(e) ? 0 > t ? jt : Lt : 0 > e ? zt : Bt
        }

        function z(t, e, n) {
            n || (n = Ht);
            var i = e[n[0]] - t[n[0]], r = e[n[1]] - t[n[1]];
            return Math.sqrt(i * i + r * r)
        }

        function B(t, e, n) {
            n || (n = Ht);
            var i = e[n[0]] - t[n[0]], r = e[n[1]] - t[n[1]];
            return 180 * Math.atan2(r, i) / Math.PI
        }

        function q(t, e) {
            return B(e[1], e[0], Xt) + B(t[1], t[0], Xt)
        }

        function R(t, e) {
            return z(e[0], e[1], Xt) / z(t[0], t[1], Xt)
        }

        function F() {
            this.evEl = $t, this.evWin = Jt, this.allow = !0, this.pressed = !1, P.apply(this, arguments)
        }

        function H() {
            this.evEl = Vt, this.evWin = Zt, P.apply(this, arguments), this.store = this.manager.session.pointerEvents = []
        }

        function X() {
            this.evTarget = Qt, this.evWin = Gt, this.started = !1, P.apply(this, arguments)
        }

        function Y(t, e) {
            var n = k(t.touches), i = k(t.changedTouches);
            return e & (Dt | Nt) && (n = x(n.concat(i), "identifier", !0)), [n, i]
        }

        function $() {
            this.evTarget = ee, this.targetIds = {}, P.apply(this, arguments)
        }

        function J(t, e) {
            var n = k(t.touches), i = this.targetIds;
            if (e & (At | Mt) && 1 === n.length) return i[n[0].identifier] = !0, [n, n];
            var r, o, s = k(t.changedTouches), a = [], c = this.target;
            if (o = n.filter(function (t) {
                    return y(t.target, c)
                }), e === At) for (r = 0; r < o.length;) i[o[r].identifier] = !0, r++;
            for (r = 0; r < s.length;) i[s[r].identifier] && a.push(s[r]), e & (Dt | Nt) && delete i[s[r].identifier], r++;
            return a.length ? [x(o.concat(a), "identifier", !0), a] : void 0
        }

        function U() {
            P.apply(this, arguments);
            var t = p(this.handler, this);
            this.touch = new $(this.manager, t), this.mouse = new F(this.manager, t)
        }

        function W(t, e) {
            this.manager = t, this.set(e)
        }

        function V(t) {
            if (b(t, ae)) return ae;
            var e = b(t, ce), n = b(t, ue);
            return e && n ? ae : e || n ? e ? ce : ue : b(t, se) ? se : oe
        }

        function Z(t) {
            this.options = ht({}, this.defaults, t || {}), this.id = S(), this.manager = null, this.options.enable = v(this.options.enable, !0), this.state = le, this.simultaneous = {}, this.requireFail = []
        }

        function K(t) {
            return t & ve ? "cancel" : t & pe ? "end" : t & de ? "move" : t & he ? "start" : ""
        }

        function Q(t) {
            return t == Bt ? "down" : t == zt ? "up" : t == jt ? "left" : t == Lt ? "right" : ""
        }

        function G(t, e) {
            var n = e.manager;
            return n ? n.get(t) : t
        }

        function tt() {
            Z.apply(this, arguments)
        }

        function et() {
            tt.apply(this, arguments), this.pX = null, this.pY = null
        }

        function nt() {
            tt.apply(this, arguments)
        }

        function it() {
            Z.apply(this, arguments), this._timer = null, this._input = null
        }

        function rt() {
            tt.apply(this, arguments)
        }

        function ot() {
            tt.apply(this, arguments)
        }

        function st() {
            Z.apply(this, arguments), this.pTime = !1, this.pCenter = !1, this._timer = null, this._input = null, this.count = 0
        }

        function at(t, e) {
            return e = e || {}, e.recognizers = v(e.recognizers, at.defaults.preset), new ct(t, e)
        }

        function ct(t, e) {
            this.options = ht({}, at.defaults, e || {}), this.options.inputTarget = this.options.inputTarget || t, this.handlers = {}, this.session = {}, this.recognizers = [], this.element = t, this.input = C(this), this.touchAction = new W(this, this.options.touchAction), ut(this, !0), l(this.options.recognizers, function (t) {
                var e = this.add(new t[0](t[1]));
                t[2] && e.recognizeWith(t[2]), t[3] && e.requireFailure(t[3])
            }, this)
        }

        function ut(t, e) {
            var n = t.element;
            n.style && l(t.options.cssProps, function (t, i) {
                n.style[T(n.style, i)] = e ? t : ""
            })
        }

        function lt(t, e) {
            var n = o.createEvent("Event");
            n.initEvent(t, !0, !0), n.gesture = e, e.target.dispatchEvent(n)
        }

        var ht, dt = ["", "webkit", "Moz", "MS", "ms", "o"], pt = o.createElement("div"), ft = "function",
            vt = Math.round, mt = Math.abs, gt = Date.now;
        ht = "function" != typeof Object.assign ? function (t) {
            if (t === a || null === t) throw new TypeError("Cannot convert undefined or null to object");
            for (var e = Object(t), n = 1; n < arguments.length; n++) {
                var i = arguments[n];
                if (i !== a && null !== i) for (var r in i) i.hasOwnProperty(r) && (e[r] = i[r])
            }
            return e
        } : Object.assign;
        var yt = h(function (t, e, n) {
                for (var i = Object.keys(e), r = 0; r < i.length;) (!n || n && t[i[r]] === a) && (t[i[r]] = e[i[r]]), r++;
                return t
            }, "extend", "Use `assign`."), bt = h(function (t, e) {
                return yt(t, e, !0)
            }, "merge", "Use `assign`."), wt = 1, _t = /mobile|tablet|ip(ad|hone|od)|android/i, kt = "ontouchstart" in r,
            xt = T(r, "PointerEvent") !== a, Tt = kt && _t.test(navigator.userAgent), St = "touch", Et = "pen",
            Pt = "mouse", Ct = "kinect", It = 25, At = 1, Mt = 2, Dt = 4, Nt = 8, Ot = 1, jt = 2, Lt = 4, zt = 8,
            Bt = 16, qt = jt | Lt, Rt = zt | Bt, Ft = qt | Rt, Ht = ["x", "y"], Xt = ["clientX", "clientY"];
        P.prototype = {
            handler: function () {
            }, init: function () {
                this.evEl && m(this.element, this.evEl, this.domHandler), this.evTarget && m(this.target, this.evTarget, this.domHandler), this.evWin && m(E(this.element), this.evWin, this.domHandler)
            }, destroy: function () {
                this.evEl && g(this.element, this.evEl, this.domHandler), this.evTarget && g(this.target, this.evTarget, this.domHandler), this.evWin && g(E(this.element), this.evWin, this.domHandler)
            }
        };
        var Yt = {mousedown: At, mousemove: Mt, mouseup: Dt}, $t = "mousedown", Jt = "mousemove mouseup";
        d(F, P, {
            handler: function (t) {
                var e = Yt[t.type];
                e & At && 0 === t.button && (this.pressed = !0), e & Mt && 1 !== t.which && (e = Dt), this.pressed && this.allow && (e & Dt && (this.pressed = !1), this.callback(this.manager, e, {
                    pointers: [t],
                    changedPointers: [t],
                    pointerType: Pt,
                    srcEvent: t
                }))
            }
        });
        var Ut = {pointerdown: At, pointermove: Mt, pointerup: Dt, pointercancel: Nt, pointerout: Nt},
            Wt = {2: St, 3: Et, 4: Pt, 5: Ct}, Vt = "pointerdown", Zt = "pointermove pointerup pointercancel";
        r.MSPointerEvent && !r.PointerEvent && (Vt = "MSPointerDown", Zt = "MSPointerMove MSPointerUp MSPointerCancel"), d(H, P, {
            handler: function (t) {
                var e = this.store, n = !1, i = t.type.toLowerCase().replace("ms", ""), r = Ut[i],
                    o = Wt[t.pointerType] || t.pointerType, s = o == St, a = _(e, t.pointerId, "pointerId");
                r & At && (0 === t.button || s) ? 0 > a && (e.push(t), a = e.length - 1) : r & (Dt | Nt) && (n = !0), 0 > a || (e[a] = t, this.callback(this.manager, r, {
                    pointers: e,
                    changedPointers: [t],
                    pointerType: o,
                    srcEvent: t
                }), n && e.splice(a, 1))
            }
        });
        var Kt = {touchstart: At, touchmove: Mt, touchend: Dt, touchcancel: Nt}, Qt = "touchstart",
            Gt = "touchstart touchmove touchend touchcancel";
        d(X, P, {
            handler: function (t) {
                var e = Kt[t.type];
                if (e === At && (this.started = !0), this.started) {
                    var n = Y.call(this, t, e);
                    e & (Dt | Nt) && n[0].length - n[1].length === 0 && (this.started = !1), this.callback(this.manager, e, {
                        pointers: n[0],
                        changedPointers: n[1],
                        pointerType: St,
                        srcEvent: t
                    })
                }
            }
        });
        var te = {touchstart: At, touchmove: Mt, touchend: Dt, touchcancel: Nt},
            ee = "touchstart touchmove touchend touchcancel";
        d($, P, {
            handler: function (t) {
                var e = te[t.type], n = J.call(this, t, e);
                n && this.callback(this.manager, e, {
                    pointers: n[0],
                    changedPointers: n[1],
                    pointerType: St,
                    srcEvent: t
                })
            }
        }), d(U, P, {
            handler: function (t, e, n) {
                var i = n.pointerType == St, r = n.pointerType == Pt;
                if (i) this.mouse.allow = !1; else if (r && !this.mouse.allow) return;
                e & (Dt | Nt) && (this.mouse.allow = !0), this.callback(t, e, n)
            }, destroy: function () {
                this.touch.destroy(), this.mouse.destroy()
            }
        });
        var ne = T(pt.style, "touchAction"), ie = ne !== a, re = "compute", oe = "auto", se = "manipulation",
            ae = "none", ce = "pan-x", ue = "pan-y";
        W.prototype = {
            set: function (t) {
                t == re && (t = this.compute()), ie && this.manager.element.style && (this.manager.element.style[ne] = t), this.actions = t.toLowerCase().trim()
            }, update: function () {
                this.set(this.manager.options.touchAction)
            }, compute: function () {
                var t = [];
                return l(this.manager.recognizers, function (e) {
                    f(e.options.enable, [e]) && (t = t.concat(e.getTouchAction()))
                }), V(t.join(" "))
            }, preventDefaults: function (t) {
                if (!ie) {
                    var e = t.srcEvent, n = t.offsetDirection;
                    if (this.manager.session.prevented) return void e.preventDefault();
                    var i = this.actions, r = b(i, ae), o = b(i, ue), s = b(i, ce);
                    if (r) {
                        var a = 1 === t.pointers.length, c = t.distance < 2, u = t.deltaTime < 250;
                        if (a && c && u) return
                    }
                    if (!s || !o) return r || o && n & qt || s && n & Rt ? this.preventSrc(e) : void 0
                }
            }, preventSrc: function (t) {
                this.manager.session.prevented = !0, t.preventDefault()
            }
        };
        var le = 1, he = 2, de = 4, pe = 8, fe = pe, ve = 16, me = 32;
        Z.prototype = {
            defaults: {}, set: function (t) {
                return ht(this.options, t), this.manager && this.manager.touchAction.update(), this
            }, recognizeWith: function (t) {
                if (u(t, "recognizeWith", this)) return this;
                var e = this.simultaneous;
                return t = G(t, this), e[t.id] || (e[t.id] = t, t.recognizeWith(this)), this
            }, dropRecognizeWith: function (t) {
                return u(t, "dropRecognizeWith", this) ? this : (t = G(t, this), delete this.simultaneous[t.id], this)
            }, requireFailure: function (t) {
                if (u(t, "requireFailure", this)) return this;
                var e = this.requireFail;
                return t = G(t, this), -1 === _(e, t) && (e.push(t), t.requireFailure(this)), this
            }, dropRequireFailure: function (t) {
                if (u(t, "dropRequireFailure", this)) return this;
                t = G(t, this);
                var e = _(this.requireFail, t);
                return e > -1 && this.requireFail.splice(e, 1), this
            }, hasRequireFailures: function () {
                return this.requireFail.length > 0
            }, canRecognizeWith: function (t) {
                return !!this.simultaneous[t.id]
            }, emit: function (t) {
                function e(e) {
                    n.manager.emit(e, t)
                }

                var n = this, i = this.state;
                pe > i && e(n.options.event + K(i)), e(n.options.event), t.additionalEvent && e(t.additionalEvent), i >= pe && e(n.options.event + K(i))
            }, tryEmit: function (t) {
                return this.canEmit() ? this.emit(t) : void(this.state = me)
            }, canEmit: function () {
                for (var t = 0; t < this.requireFail.length;) {
                    if (!(this.requireFail[t].state & (me | le))) return !1;
                    t++
                }
                return !0
            }, recognize: function (t) {
                var e = ht({}, t);
                return f(this.options.enable, [this, e]) ? (this.state & (fe | ve | me) && (this.state = le), this.state = this.process(e), void(this.state & (he | de | pe | ve) && this.tryEmit(e))) : (this.reset(), void(this.state = me))
            }, process: function () {
            }, getTouchAction: function () {
            }, reset: function () {
            }
        }, d(tt, Z, {
            defaults: {pointers: 1}, attrTest: function (t) {
                var e = this.options.pointers;
                return 0 === e || t.pointers.length === e
            }, process: function (t) {
                var e = this.state, n = t.eventType, i = e & (he | de), r = this.attrTest(t);
                return i && (n & Nt || !r) ? e | ve : i || r ? n & Dt ? e | pe : e & he ? e | de : he : me
            }
        }), d(et, tt, {
            defaults: {event: "pan", threshold: 10, pointers: 1, direction: Ft},
            getTouchAction: function () {
                var t = this.options.direction, e = [];
                return t & qt && e.push(ue), t & Rt && e.push(ce), e
            },
            directionTest: function (t) {
                var e = this.options, n = !0, i = t.distance, r = t.direction, o = t.deltaX, s = t.deltaY;
                return r & e.direction || (e.direction & qt ? (r = 0 === o ? Ot : 0 > o ? jt : Lt, n = o != this.pX, i = Math.abs(t.deltaX)) : (r = 0 === s ? Ot : 0 > s ? zt : Bt, n = s != this.pY, i = Math.abs(t.deltaY))), t.direction = r, n && i > e.threshold && r & e.direction
            },
            attrTest: function (t) {
                return tt.prototype.attrTest.call(this, t) && (this.state & he || !(this.state & he) && this.directionTest(t))
            },
            emit: function (t) {
                this.pX = t.deltaX, this.pY = t.deltaY;
                var e = Q(t.direction);
                e && (t.additionalEvent = this.options.event + e), this._super.emit.call(this, t)
            }
        }), d(nt, tt, {
            defaults: {event: "pinch", threshold: 0, pointers: 2}, getTouchAction: function () {
                return [ae]
            }, attrTest: function (t) {
                return this._super.attrTest.call(this, t) && (Math.abs(t.scale - 1) > this.options.threshold || this.state & he)
            }, emit: function (t) {
                if (1 !== t.scale) {
                    var e = t.scale < 1 ? "in" : "out";
                    t.additionalEvent = this.options.event + e
                }
                this._super.emit.call(this, t)
            }
        }), d(it, Z, {
            defaults: {event: "press", pointers: 1, time: 251, threshold: 9}, getTouchAction: function () {
                return [oe]
            }, process: function (t) {
                var e = this.options, n = t.pointers.length === e.pointers, i = t.distance < e.threshold,
                    r = t.deltaTime > e.time;
                if (this._input = t, !i || !n || t.eventType & (Dt | Nt) && !r) this.reset(); else if (t.eventType & At) this.reset(), this._timer = c(function () {
                    this.state = fe, this.tryEmit()
                }, e.time, this); else if (t.eventType & Dt) return fe;
                return me
            }, reset: function () {
                clearTimeout(this._timer)
            }, emit: function (t) {
                this.state === fe && (t && t.eventType & Dt ? this.manager.emit(this.options.event + "up", t) : (this._input.timeStamp = gt(), this.manager.emit(this.options.event, this._input)))
            }
        }), d(rt, tt, {
            defaults: {event: "rotate", threshold: 0, pointers: 2}, getTouchAction: function () {
                return [ae]
            }, attrTest: function (t) {
                return this._super.attrTest.call(this, t) && (Math.abs(t.rotation) > this.options.threshold || this.state & he)
            }
        }), d(ot, tt, {
            defaults: {event: "swipe", threshold: 10, velocity: .3, direction: qt | Rt, pointers: 1},
            getTouchAction: function () {
                return et.prototype.getTouchAction.call(this)
            },
            attrTest: function (t) {
                var e, n = this.options.direction;
                return n & (qt | Rt) ? e = t.overallVelocity : n & qt ? e = t.overallVelocityX : n & Rt && (e = t.overallVelocityY), this._super.attrTest.call(this, t) && n & t.offsetDirection && t.distance > this.options.threshold && t.maxPointers == this.options.pointers && mt(e) > this.options.velocity && t.eventType & Dt
            },
            emit: function (t) {
                var e = Q(t.offsetDirection);
                e && this.manager.emit(this.options.event + e, t), this.manager.emit(this.options.event, t)
            }
        }), d(st, Z, {
            defaults: {
                event: "tap",
                pointers: 1,
                taps: 1,
                interval: 300,
                time: 250,
                threshold: 9,
                posThreshold: 10
            }, getTouchAction: function () {
                return [se]
            }, process: function (t) {
                var e = this.options, n = t.pointers.length === e.pointers, i = t.distance < e.threshold,
                    r = t.deltaTime < e.time;
                if (this.reset(), t.eventType & At && 0 === this.count) return this.failTimeout();
                if (i && r && n) {
                    if (t.eventType != Dt) return this.failTimeout();
                    var o = !this.pTime || t.timeStamp - this.pTime < e.interval,
                        s = !this.pCenter || z(this.pCenter, t.center) < e.posThreshold;
                    this.pTime = t.timeStamp, this.pCenter = t.center, s && o ? this.count += 1 : this.count = 1, this._input = t;
                    var a = this.count % e.taps;
                    if (0 === a) return this.hasRequireFailures() ? (this._timer = c(function () {
                        this.state = fe, this.tryEmit()
                    }, e.interval, this), he) : fe
                }
                return me
            }, failTimeout: function () {
                return this._timer = c(function () {
                    this.state = me
                }, this.options.interval, this), me
            }, reset: function () {
                clearTimeout(this._timer)
            }, emit: function () {
                this.state == fe && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input))
            }
        }), at.VERSION = "2.0.6", at.defaults = {
            domEvents: !1,
            touchAction: re,
            enable: !0,
            inputTarget: null,
            inputClass: null,
            preset: [[rt, {enable: !1}], [nt, {enable: !1}, ["rotate"]], [ot, {direction: qt}], [et, {direction: qt}, ["swipe"]], [st], [st, {
                event: "doubletap",
                taps: 2
            }, ["tap"]], [it]],
            cssProps: {
                userSelect: "none",
                touchSelect: "none",
                touchCallout: "none",
                contentZooming: "none",
                userDrag: "none",
                tapHighlightColor: "rgba(0,0,0,0)"
            }
        };
        var ge = 1, ye = 2;
        ct.prototype = {
            set: function (t) {
                return ht(this.options, t), t.touchAction && this.touchAction.update(), t.inputTarget && (this.input.destroy(), this.input.target = t.inputTarget, this.input.init()), this
            }, stop: function (t) {
                this.session.stopped = t ? ye : ge
            }, recognize: function (t) {
                var e = this.session;
                if (!e.stopped) {
                    this.touchAction.preventDefaults(t);
                    var n, i = this.recognizers, r = e.curRecognizer;
                    (!r || r && r.state & fe) && (r = e.curRecognizer = null);
                    for (var o = 0; o < i.length;) n = i[o], e.stopped === ye || r && n != r && !n.canRecognizeWith(r) ? n.reset() : n.recognize(t), !r && n.state & (he | de | pe) && (r = e.curRecognizer = n), o++
                }
            }, get: function (t) {
                if (t instanceof Z) return t;
                for (var e = this.recognizers, n = 0; n < e.length; n++) if (e[n].options.event == t) return e[n];
                return null
            }, add: function (t) {
                if (u(t, "add", this)) return this;
                var e = this.get(t.options.event);
                return e && this.remove(e), this.recognizers.push(t), t.manager = this, this.touchAction.update(), t
            }, remove: function (t) {
                if (u(t, "remove", this)) return this;
                if (t = this.get(t)) {
                    var e = this.recognizers, n = _(e, t);
                    -1 !== n && (e.splice(n, 1), this.touchAction.update())
                }
                return this
            }, on: function (t, e) {
                var n = this.handlers;
                return l(w(t), function (t) {
                    n[t] = n[t] || [], n[t].push(e)
                }), this
            }, off: function (t, e) {
                var n = this.handlers;
                return l(w(t), function (t) {
                    e ? n[t] && n[t].splice(_(n[t], e), 1) : delete n[t]
                }), this
            }, emit: function (t, e) {
                this.options.domEvents && lt(t, e);
                var n = this.handlers[t] && this.handlers[t].slice();
                if (n && n.length) {
                    e.type = t, e.preventDefault = function () {
                        e.srcEvent.preventDefault()
                    };
                    for (var i = 0; i < n.length;) n[i](e), i++
                }
            }, destroy: function () {
                this.element && ut(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null
            }
        }, ht(at, {
            INPUT_START: At,
            INPUT_MOVE: Mt,
            INPUT_END: Dt,
            INPUT_CANCEL: Nt,
            STATE_POSSIBLE: le,
            STATE_BEGAN: he,
            STATE_CHANGED: de,
            STATE_ENDED: pe,
            STATE_RECOGNIZED: fe,
            STATE_CANCELLED: ve,
            STATE_FAILED: me,
            DIRECTION_NONE: Ot,
            DIRECTION_LEFT: jt,
            DIRECTION_RIGHT: Lt,
            DIRECTION_UP: zt,
            DIRECTION_DOWN: Bt,
            DIRECTION_HORIZONTAL: qt,
            DIRECTION_VERTICAL: Rt,
            DIRECTION_ALL: Ft,
            Manager: ct,
            Input: P,
            TouchAction: W,
            TouchInput: $,
            MouseInput: F,
            PointerEventInput: H,
            TouchMouseInput: U,
            SingleTouchInput: X,
            Recognizer: Z,
            AttrRecognizer: tt,
            Tap: st,
            Pan: et,
            Swipe: ot,
            Pinch: nt,
            Rotate: rt,
            Press: it,
            on: m,
            off: g,
            each: l,
            merge: bt,
            extend: yt,
            assign: ht,
            inherit: d,
            bindFn: p,
            prefixed: T
        });
        var be = "undefined" != typeof r ? r : "undefined" != typeof self ? self : {};
        be.Hammer = at, i = function () {
            return at
        }.call(e, n, e, t), !(void 0 !== i && (t.exports = i))
    }(window, document, "Hammer")
}, function (t, e, n) {
    function i() {
        c.init()
    }

    /*!
	 * favorite.js
	 * @date 2016.3.15
	 * @author chenjinghui@meizu.com
	 * @version 0.0.1
	 */
    var r = n(29), o = n(45), s = n(46), a = new s, c = ({
        promoInner: r("#J_promoInner"),
        discountCouponList: r("#J_discountCouponList")
    }, {
        remoteURL: {addFavorite: "//me.m.meizu.com/vip/favorite"}, init: function () {
            var t = this;
            t.bindEvent()
        }, bindEvent: function () {
            var t = this;
            r("#J_favorite").on("tap", function (e) {
                var n = (r(e.currentTarget), MZ.modelData.itemId);
                o.ajax(t.remoteURL.addFavorite, {itemId: n}).done(function (t) {
                    1 === t ? a.open("收藏成功") : a.open("您已收藏过该商品")
                }).fail(function (t, e) {
                    401 === e.code ? (a.open("请先登录!"), setTimeout(function () {
                        o.login("mall")
                    }, 1e3)) : a.open(t)
                }), e.preventDefault(), e.stopPropagation()
            })
        }
    });
    t.exports = i
}, function (t, e, n) {/*!
	 * detail-common.js
	 * @date 2016.8.15
	 * @author chenjinghui@meizu.com
	 * @version 0.0.1
	 */
    var i, r, o, s, a, c = n(29);
    r = function (t, e, n, i) {
        var r = Math.floor((e - t) / 1e3) - 1, o = setInterval(function () {
            r <= 0 ? (i && i(), clearInterval(o)) : n && n(r), r--
        }, 1e3);
        return o
    }, i = function (t) {
        var e, n, i = {store: "http://store.meizu.com/", mall: "http://mall.meizu.com/"},
            r = "https://login.flyme.cn/vCodeLogin?";
        n = t ? i[t] : location.host.match("mall.meizu.com") ? i.mall : i.store, e = {
            useruri: n + "member/login.html?useruri=" + location.href,
            service: "store",
            sid: "unionlogin",
            autodirct: !0
        }, location.href = r + c.param(e)
    }, o = function (t, e, n, i) {
        var r = c.Deferred();
        return c.ajax({
            url: t,
            data: e ? e : null,
            type: n ? n : "get",
            dataType: i ? i : "jsonp",
            timeout: 4e3,
            cache: !1
        }).done(function (t) {
            t.success ? r.resolve(t.data, t) : r.reject(t.message || t.msg, t)
        }).fail(function () {
            r.reject("网络异常，请稍后再试!")
        }), r.promise()
    }, s = function (t, e, n) {
        var i;
        return n = n || ".jpg", i = /^\/\/openfile/.test(t) ? t + e + "x" + e + n : t + "@" + e + "x" + e + n
    }, a = function () {
        var t = function (t) {
            for (var e, n = document.cookie ? document.cookie.split(/;[ ]*/) : [], i = 0, r = n.length; i < r; i++) {
                var o = n[i].split("=");
                if (t && t == decodeURIComponent(o[0])) {
                    e = decodeURIComponent(o[1]);
                    break
                }
            }
            return e
        }, e = t("MEIZUSTORESESSIONVAL");
        return !!e
    }, t.exports = {ajax: o, login: i, countDown: r, imageUrlProcess: s, isLogin: a}
}, function (t, e, n) {
    var i;
    !function (r, o) {
        "use strict";

        function s(t) {
        }

        s.prototype.open = function (t, e, n) {
            if (t && "string" == typeof t) {
                n = n || 1500;
                var i = this, r = '<div class="popup popmsg"><div class="wrap"><div class="cell">';
                r += '<div class="content">' + t + "</div>", r += "</div></div></div>";
                var s = o("body"), a = o(r);
                s.hasClass("popup-open") || (s.addClass("popup-open"), a.appendTo(s).fadeIn(200)), setTimeout(function () {
                    a.fadeOut(200, function () {
                        s.removeClass("popup-open"), a.remove()
                    }), e && o.isFunction(e) && e.call(i, arguments)
                }, n)
            }
        }, "undefined" != typeof t && t.exports ? t.exports = s : n(34).cmd || n(35) ? (i = function (t, e, n) {
            return s
        }.call(e, n, e, t), !(void 0 !== i && (t.exports = i))) : window.Message = s
    }(window, window.jQuery || window.Zepto)
}, function (t, e, n) {
    function i(t) {
        l.init(t)
    }

    /*!
	 * coupon.js
	 * @date 2016.3.15
	 * @author chenjinghui@meizu.com
	 * @version 0.0.1
	 */
    var r = n(29), o = n(45), s = (n(30), n(46)), a = n(48), c = new s;
    r.fn.slideDown = function (t) {
        var e = this.css("position");
        t = t || 200, this.show(), this.css({position: "absolute", visibility: "hidden"});
        var n = this.height();
        this.css({position: e, visibility: "visible", overflow: "hidden", height: 0}), this.animate({height: n}, t)
    };
    var u = {promoInner: r("#J_promoInner"), discountCouponList: r("#J_discountCouponList")}, l = {
        remoteURL: {
            getCouponList: "//promotion.meizu.com/coupon/item/list/",
            getCoupon: "//promotion.meizu.com/coupon/acquire/"
        }, init: function (t) {
            var e = this;
            e.getCoupon(t), e.bindEvent()
        }, bindEvent: function () {
            var t = this;
            r("#J_discountCouponList").on("tap", ".vm-btn", function (e) {
                var n = r(e.currentTarget), i = n.data("key");
                o.ajax(t.remoteURL.getCoupon + i, null).done(function (t) {
                    c.open("领取成功")
                }).fail(function (t, e) {
                    401 === e.code ? (c.open("请先登录!"), setTimeout(function () {
                        o.login("mall")
                    }, 1e3)) : c.open(t)
                }), e.preventDefault(), e.stopPropagation()
            })
        }, getCoupon: function (t) {
            var e = this, n = e.remoteURL.getCouponList + t;
            o.ajax(n, {scope: 3}, "get", "jsonp").done(function (t) {
                t && t.length && (t = e.formatData(t), e.renderCoupon(t))
            })
        }, formatData: function (t) {
            var e = function (t) {
                var e = new Date(t), n = e.getFullYear(), i = e.getMonth() + 1, r = e.getDate(),
                    o = e.getHours() < 10 ? "0" + e.getHours() : e.getHours(),
                    s = e.getMinutes() < 10 ? "0" + e.getMinutes() : e.getMinutes();
                return n + "." + i + "." + r + " " + o + ":" + s
            };
            return r.each(t, function (t, n) {
                n.start = e(n.start), n.end = e(n.end)
            }), t
        }, renderCoupon: function (t) {
            var e = "";
            t && (r.each(t, function (t, n) {
                e += 1 === n.couponType ? '<span class="vm-tag"><em>满' + n.consumptionQuota + "减" + n.reductionQuota + "</em></span>" : '<span class="vm-tag multiple"><em>满' + n.consumptionQuota + "减" + n.reductionQuota + "</em></span>"
            }), couponListLayer = a({listData: t}), u.promoInner.append(e).parent().slideDown(600), u.discountCouponList.append(couponListLayer))
        }
    };
    t.exports = i
}, function (module, exports) {
    module.exports = function (obj) {
        var __t, __p = "", __j = Array.prototype.join, print = function () {
            __p += __j.call(arguments, "")
        };
        with (obj || {}) {
            __p += "";
            for (var i = 0, length = listData.length; i < length; i++) __p += '\n    <dd class="discount-coupon-item clearfix ', 2 === listData[i].couponType && (__p += "multiple"), __p += '">\n        <div class="mod-btn">\n            <a class="vm-btn" data-key="' + (null == (__t = listData[i].couponKey) ? "" : __t) + '"></a>\n        </div>\n       \t<div class="mod-bd">\n            <p class="mod-bd-value">\n                <span class="vm-amount"><sup>¥</sup>' + (null == (__t = listData[i].reductionQuota) ? "" : __t) + "</span>\n                <em>\n                ", __p += 1 === listData[i].couponType ? "\n                (单品券)\n                " : "\n                (多品券)\n                ", __p += '\n                </em>\n            </p>\n            <p class="mod-bd-name">\n                <span class="vm-name">' + (null == (__t = listData[i].couponName) ? "" : __t) + '优惠券</span>\n                <span class="vm-claim">满' + (null == (__t = listData[i].consumptionQuota) ? "" : __t) + '可用</span>\n            </p>\n            <p class="mod-bd-info">\n                <span>' + (null == (__t = listData[i].start) ? "" : __t) + "－" + (null == (__t = listData[i].end) ? "" : __t) + '</span>\n                <span class="vm-range ellipsis">适用范围：' + (null == (__t = listData[i].appliableDesc) ? "" : __t) + "</span>\n            </p>\n        </div>\n    </dd>\n";
            __p += ""
        }
        return __p
    }
}, function (t, e, n) {/*!
	 * kefu.js
	 * @date 2017.8.25
	 * @author chenjinghui@meizu.com
	 * @version 0.0.1
	 */
    var r = n(45), o = {erp: "//ordercenter.meizu.com/xiaoneng/erp/param"}, s = window.MZ.modelData, a = function (t) {
        var e = 0;
        if (0 == t.length) return e;
        for (i = 0; i < t.length; i++) char = t.charCodeAt(i), e = (e << 5) - e + char, e &= e;
        return "游客" + (e + "").slice(-5) || "游客"
    };
    t.exports = function () {
        var t = window.NTKF_PARAM;
        s.showXiaoNeng && $("#J_kefu").show().on("tap", function (e) {
            e.preventDefault(), r.ajax(o.erp, {supplier_id: s.merchantId}).done(function (e) {
                t.erpparam = e.erpparam, t.uid = e.uid, t.uname = e.uname, e.tjcoid && (t.uid = e.tjcoid), e.uname || (t.uname = a(e.tjcoid))
            }).always(function () {
                NTKF.im_openInPageChat()
            })
        })
    }
}, function (t, e) {
    e.conversionSkuKeyToObj = function (t) {
        var e, n = {}, i = t.split("+")[0];
        return i.split(";").forEach(function (t) {
            e = t.split(":"), n[e[0]] = t
        }), n
    }, e.queryString = function (t) {
        var e = location.search.match(new RegExp("[?&]" + t + "=([^&]*)(&?)", "i"));
        return e ? e[1] : ""
    }, e.parseSku = function (t) {
        var e, n, i = [];
        return $.each(t, function (t, r) {
            e = t.split("+")[0], $.each(e.split(";"), function (t, e) {
                n = e.split(":"), r[n[0]] = n[1]
            }), r.id = t, r.pvs = e, i.push(r)
        }), i
    }, e.getRecommend = function (t, e) {
        var n;
        return n = t && e.skuMap[t] ? e.skuMap[t] : e.recommend
    }, e.lockButton = function (t, e) {
        e = e || 3e3, t.addClass("locked").prop("disabled", !0), window.setTimeout(function () {
            t.removeClass("locked").prop("disabled", !1)
        }, e)
    }
}, function (t, e, n) {/*!
	 * snapup-timing.js
	 * @date 2016.3.15
	 * @author chenjinghui@meizu.com
	 * @version 0.0.1
	 */
    var i = (n(30), n(31)), r = i.Model.extend({
        defaults: {
            buyButton: "",
            images: null,
            names: "",
            packageIds: null,
            price: "",
            priceCent: 0,
            pvs: "",
            skuId: 0,
            stock: 0,
            attributes: "",
            type: 1,
            shelveTime: 0,
            activeStatus: 0,
            isSupportCart: !1
        }
    }), o = i.Collection.extend({model: r}), s = i.Model.extend({
        defaults: {
            buyButton: "",
            images: null,
            names: "",
            packageIds: null,
            price: "",
            priceCent: 0,
            pvs: "",
            skuId: "",
            stock: "",
            attributes: "",
            propItem: null,
            propSet: null,
            total: 0,
            quantity: 1,
            activePackage: "",
            packageSet: null,
            packageSkuIds: null,
            packageTotalPriceCent: 0,
            packageTotalProfitsCent: 0,
            packageMap: null,
            packageItems: null,
            mainPriceCent: 0,
            costPriceCent: 0,
            panicToken: "",
            type: 1,
            shelveTime: 0,
            activeStatus: 1,
            isSupportCart: !1,
            periods: ""
        }
    });
    t.exports = {ProModel: s, SkuCollection: o}
}, function (t, e, n) {/*!
	 * view.js
	 * @date 2017.7.25
	 * @author chenjinghui@meizu.com
	 * @version 0.0.1
	 */
    var i = n(29), r = n(30), o = n(31), s = n(53), a = n(54);
    window.Decimal = a;
    var c = n(46), u = new c, l = n(45), h = n(55), d = n(50), p = n(56), f = n(57), v = n(58), m = n(60),
        g = window.MZ.modelData, y = {
            orderAdd: "//ordercenter.mall.meizu.com/order/mall/add.html",
            getStock: "//detail.mall.meizu.com/api/sku/stock"
        }, b = o.View.extend({
            events: {
                "tap #headerBack": p.goBack,
                "tap #J_prodPromo": "ctrlHandler",
                "tap #J_prodService": "ctrlHandler",
                "tap #J_prodSelected": "handlerOpenProps",
                "tap #J_prodSuda": "ctrlHandler",
                "tap .J_btnClose": "ctrlHandler",
                "tap .property-sibling a": p.goSibling,
                "tap .property-sale a": "setProp",
                "tap .property-package a": "setPackage",
                "tap #J_huabeiBody a": "setHuabei",
                "tap .vm-minus": p.quantityMinus,
                "tap .vm-plus": p.quantityPlus,
                "tap #J_packageTab a": "setPackage",
                "tap .mod-prop a": "activePackageItem",
                "tap #J_packageEnter": "ctrlHandler",
                "tap #J_btnBuyNow": "distributeSubmit",
                "tap #J_btnBuyPropsEnter": "distributeSubmit",
                "tap .layer-cover": "quickClose"
            },
            templatePackageItem: '<%for(var i=0,length=packages.length;i<length;i++){%><%if(packages[i].available) {%><a data-value="<%= packages[i].id %>" class="prop" data-mtype="mall_de_pa_set_<%=(i+1) %>"><%=packages[i].name%></a><%} else {%><a data-value="<%= packages[i].id %>" class="prop disabled" data-mtype="mall_de_pa_set_<%=(i+1) %>"><%=packages[i].name%></a><%}%><%}%>',
            imgLoaded: [],
            propEnsure: !1,
            openPropType: "full",
            initialize: function () {
                var t = this;
                t.listenTo(t.model, "change:pvs", t.updatePvs), t.listenTo(t.model, "change:propSet", t.mergeSkuModel), t.listenTo(t.model, "change:activePackage", t.activePackage), t.listenTo(t.model, "change:packageIds", t.handlerPackage), t.listenTo(t.model, "change:stock", t.updateStock), t.listenTo(t.model, "change:buyButton", t.updateButton), t.listenTo(t.model, "change:packageName", t.updateSummaryInfo), t.listenTo(t.model, "change:attributes", t.updateSummaryInfo), t.listenTo(t.model, "change:mainPriceCent", t.updatePrice), t.listenTo(t.model, "change:packageTotalPriceCent", t.setTotalPrice), t.listenTo(t.model, "change:total", t.updateTotal), t.listenTo(t.model, "change:quantity", t.updateQuantity), t.listenTo(t.model, "change:skuId", t.handlerSkuChange), t.listenTo(t.model, "change:costPriceCent", t.updateCostPrice), f.on("QUEUE_SALE_STATUS", t.panicBuyingStockStatus.bind(t)), t.initSku()
            },
            initSku: function () {
                var t = this, e = t.model, n = (t.collection, e.get("recommend")), r = n.split("+")[0], o = n.split("+")[1],
                    s = r.split(";"), a = [], c = [], u = {};
                i.each(s, function (e, n) {
                    c = n.split(":"), u[c[0]] = n, a.push(c[0]), t.$el.find('[data-value="' + n + '"]').addClass("selected")
                }), void 0 !== o && t.model.set("initPvs", n), e.set({
                    propItem: a,
                    propSet: u
                }), t.analysis(), t.initPageContent(), location.hash.match("sibling") && t.openProps()
            },
            initPageContent: function () {
                var t = this, e = Number(h.serverTime.val()), n = g.discount && g.discount.endTime;
                g.discount && e < n && l.countDown(h.serverTime.val(), g.discount.endTime, t.getDiscountTime, t.closeDiscountCountDown), h.quantity.val(1)
            },
            getDiscountTime: function (t) {
                var e = !1;
                t >= 86400 ? e = Math.floor(t / 86400) + "天" + Math.floor(t % 86400 / 3600) + "时" : t > 0 && (e = Math.floor(t % 86400 / 3600) + "时" + Math.floor(t % 3600 / 60) + "分" + Math.floor(t % 60) + "秒"), e && h.discountCountDown.add(h.summaryDiscountCountDown).html("( 剩余<em>" + e + "</em> )")
            },
            closeDiscountCountDown: function (t) {
                location.reload()
            },
            setProp: function (t) {
                t.preventDefault();
                var e, n = this, r = i(t.currentTarget), o = r.data("value");
                r.hasClass("disabled") || r.hasClass("selected") || (e = n.automaticImprovement(o), n.model.set({propSet: e}), n.activeSales(), n.analysis())
            },
            mergeSkuModel: function (t, e) {
                var n = this, i = t.get("propItem"), r = t.get("isPackage"), o = "", s = i.every(function (t, n) {
                    return o += 0 === n ? e[t] : ";" + e[t], "" !== e[t]
                });
                s && (n.showSelectedInfo(), r ? n.packageMerge(o) : n.generalMerge(o))
            },
            generalMerge: function (t) {
                var e, n = this, i = n.model.get("skus");
                e = i[t + "+0"] ? n.getSkuModel(t + "+0") : n.getSkuModel(t), n.model.set("pvs", e.pvs, {silent: !0}), delete e.pvs, n.model.set(e)
            },
            packageMerge: function (t) {
                var e, n, o, s = this, a = s.model, c = a.get("packageIds"), u = a.get("packageMap"),
                    l = ["cspuId", "price", "originPrice", "names", "itemName", "attributes", "images", "packageIds", "priceCent", "huabei"];
                e = s.getSkuModel(t + "+", !0), n = i.extend(!0, {}, e);
                for (var h in e) l.indexOf(h) === -1 && delete e[h];
                o = n.packageIds.some(function (t) {
                    return u[t] && u[t].available
                }), o ? r.isEqual(n.packageIds, c) ? (s.model.set(e), s.model.set("pvs", n.pvs)) : (s.model.set("pvs", n.pvs, {silent: !0}), s.model.set(e)) : (s.model.set(n), s.updatePvs(a, n.pvs, !0))
            },
            getSkuModel: function (t, e) {
                var n, i = this;
                if (n = e ? i.collection.find(function (e) {
                        return e.get("id").match(t)
                    }) : i.collection.get(t)) return n = n.toJSON(), n.id.split(";").forEach(function (t) {
                    delete n[t.split(":")[0]]
                }), delete n.id, n
            },
            updatePvs: function (t, e, n) {
                var r, o = this, s = t.get("isPackage"), a = t.get("skus"), c = t.get("activePackage"), u = e + "+" + c;
                r = c || 0 === c ? o.getSkuModel(u) : o.getSkuModel(e, !0), n === !0 ? t.set({
                    buyButton: "售罄",
                    stock: 0
                }) : s && a[u] && t.set(i.extend(t.toJSON(), r))
            },
            handlerSkuChange: function (t, e) {
                var n = this;
                n.handlerPriceOrDiscount(), n.dataStatistics(e), n.setInitQuantity(1), MZ.modelData.isSupportHuabei && (n.huabei(), n.huabeiRender()), n.preSaleIcon()
            },
            handlerPriceOrDiscount: function () {
                var t, e, n, i = this, r = i.model, o = r.get("discountKeys"), s = r.get("priceCent"), a = r.get("pvs");
                t = r.get("isPackage") && r.get("activePackage") ? a + "+" + r.get("activePackage") : o && o.indexOf(a + "+0") !== -1 ? a + "+0" : a, o && o.indexOf(t) !== -1 ? (e = MZ.modelData.discount.cspuMap[t].priceCent, n = s) : (e = s, n = 0), r.set({
                    mainPriceCent: e,
                    costPriceCent: n
                })
            },
            dataStatistics: function (t) {
                var e = MZ.modelData.itemId + "_" + t;
                h.btnBuy.data("mtype", "mall_de_buy1_" + e), h.btnBuyProp.data("mtype", "mall_de_buy2_" + e)
            },
            huabei: function () {
                var t, e = this, n = e.model.get("huabei").reduce(function (t, e) {
                    return t.period > e.period ? t : e
                });
                g.huabei.forEach(function (e) {
                    e.period === n.period && (t = e.rate)
                }), h.installment.css("display", "block").find(".vm-price").text(n.eachPriceCent.toFixed(2)), h.installment.find(".vm-period").text(n.period), h.installment.find(".vm-rate").text(""), 12 === n.period && 0 == t && h.installment.find(".vm-rate").text("（0手续费）")
            },
            huabeiRender: function () {
                var t, e, n, r, o = this, s = o.model, c = s.get("quantity") || 1,
                    u = new a(o.model.get("mainPriceCent") + o.model.get("packageTotalPriceCent")), l = u.times(c), d = [];
                g.huabei.forEach(function (i) {
                    a.rounding = a.ROUND_HALF_EVEN, t = l.times(i.rate).round(), a.rounding = a.ROUND_DOWN, e = l.div(i.period).round(), n = t.div(i.period).round(), r = e.plus(n), d.push({
                        eachPrice: r.div(100).valueOf(),
                        period: i.period,
                        rate: i.rate,
                        eachRatePrice: n.div(100).valueOf()
                    })
                }), h.huabeiBd.children().each(function (t) {
                    var e, n, r = i(this);
                    d[t] && (e = "¥" + d[t].eachPrice + "×" + d[t].period + "期", n = 0 == d[t].rate ? "(免手续费)" : "(含手续费" + d[t].eachRatePrice + "/期)", r.find(".vm-periods").text(e).next().text(n))
                })
            },
            preSaleIcon: function () {
                var t = this, e = t.model.get("isPreSale"), n = '<span class="s-pre-sale">预售</span>', r = i("#prd-sliders");
                e ? r.find(".item").append(n) : r.find(".s-pre-sale").remove()
            },
            showSelectedInfo: function () {
                var t, e, n = this, r = n.model, o = r.get("propItem"), s = r.get("propSet"), a = r.get("isPackage"),
                    c = !1, u = !a || "" !== n.model.get("activePackage"), l = [], d = "";
                c = o.every(function (t, e) {
                    return !!s[t]
                }), t = h.property.find(".property-sale").map(function () {
                    return i(this).data("property")
                }).get(), i.each(o, function (t, n) {
                    e = h.property.find('[data-value="' + s[n] + '"]').text(), e && l.push(e)
                }), c && u ? (a && l.push(n.model.get("packageName")), d = l.join(","), h.selectedProps.html(d).addClass("s-selected"), h.selectedQuantity.show().parents(".prod-selected").find("label").text("已选")) : (a && t.push("套餐"), d = t.join("/"), h.selectedProps.html(d).removeClass("s-selected"), h.selectedQuantity.hide().parents(".prod-selected").find("label").text("选择"))
            },
            activePackage: function (t, e) {
                var n = this, i = t.get("packageMap"), r = t.get("pvs") + "+" + e, o = n.getSkuModel(r);
                (e || 0 === e) && i[e] ? (n.renderPackageContent(i[e]), n.packageCalculate("activePackage"), n.model.set(o)) : n.model.set({
                    packageSet: null,
                    packageSkuIds: null,
                    packageTotalPriceCent: 0,
                    packageTotalProfitsCent: 0
                }), n.showSelectedInfo(), n.updateCostPrice()
            },
            renderPackageContent: function (t) {
                var e, n, r = this, o = r.model.get("pvs"), s = r.model.get("packageMap"), a = r.model.get("packageItems"),
                    c = r.model.get("packageIds"), u = r.model.get("activePackage"), l = [], d = "";
                c && c.length && (i.each(c, function (t, e) {
                    var i = "";
                    n = s[e], n.id = e, 0 !== e && n.available && (u === e && (i += "selected"), d += '<a class="' + i + '" data-value="' + e + '">' + n.name + "</a>")
                }), h.packageTab.html(d)), t.items && i.isArray(t.items) ? (i.each(t.items, function (t, n) {
                    e = i.extend({}, a[n]), e.id = n, l.push(e)
                }), h.packageBody.html(m({
                    skuData: r.model.toJSON(),
                    quantity: r.model.get("quantity"),
                    items: l
                }))) : h.packageBody.html(m({skuData: r.getSkuModel(o, !0), quantity: r.model.get("quantity"), items: []}))
            },
            packageCalculate: function (t) {
                var e, n = this, r = n.model, o = r.get("packageItems"), s = [], a = [], c = {}, u = 0, l = 0;
                h.packageBody.find(".selected").each(function () {
                    var t = i(this), n = t.data("sku"), r = t.data("sid"), c = t.data("key");
                    s.push(n), r && c && (e = o[r].cells[c], e.fullName = o[r].name + "&nbsp;" + e.names, a.push(e))
                }), i.each(a, function (t, e) {
                    c[e.skuId] = e.fullName, u += e.priceCent, l += e.originPriceCent - e.priceCent
                }), "activePackage" == t ? (n.model.set("packageSkuIds", s, {silent: !0}), n.model.set({
                    packageSet: c,
                    packageTotalPriceCent: u,
                    packageTotalProfitsCent: l
                })) : n.model.set({packageSkuIds: s, packageSet: c, packageTotalPriceCent: u, packageTotalProfitsCent: l})
            },
            syncQuantityStatus: function (t) {
                var e = 2 === this.model.get("type") ? 1 : e = h.quantity.data("max");
                e && t >= e ? h.quantity.next().addClass("disabled") : h.quantity.next().removeClass("disabled"), 1 === t ? h.quantity.prev().addClass("disabled") : h.quantity.prev().removeClass("disabled"), h.limit.text("（限购 " + e + " 件）")
            },
            setInitQuantity: function (t) {
                var e = this, n = e.model;
                n.set("quantity", t), e.syncQuantityStatus(t)
            },
            updateQuantity: function (t, e) {
                var n = this;
                n.syncQuantityStatus(e), h.quantity.text(e).data("value", e), h.selectedQuantity.text("×" + e), h.packageBody.find(".sku-item .mod-prop em").text("×" + e), h.packageBody.find(".package-item .mod-prop em").text("×" + e), n.updateTotal(t)
            },
            automaticImprovement: function (t) {
                var e, n, r, o, s, a = this, c = a.model.get("propItem"), u = i.extend({}, a.model.get("propSet")),
                    l = t.split(":")[0], h = c.indexOf(l), f = a.collection, v = {};
                u[l] = t;
                for (var m in u) u[m] && (e = u[m].split(":"), v[e[0]] = e[1]);
                return (n = f.findWhere(v)) ? u : (r = p.lineRecommendPvs.call(a, h, v), r.done ? s = r.stockPvs : (o = p.pointRecommendPvs.call(a, l, v), s = o.stockPvs || r.noStockPvs || o.noStockPvs), s ? d.conversionSkuKeyToObj(s) : void 0)
            },
            activeSales: function () {
                var t = this, e = t.model.get("propSet");
                for (var n in e) t.$el.find('.property-sale a[data-value="' + e[n] + '"]').addClass("selected").siblings().removeClass("selected")
            },
            analysis: function () {
                var t, e, n = this, r = n.model.get("propItem"), o = i.extend({}, n.model.get("propSet")), s = n.collection,
                    a = {};
                for (var c in o) o[c] && (t = o[c].split(":"), a[t[0]] = t[1]);
                r.forEach(function (t, r, o) {
                    if (r > 0) {
                        var c = i.extend({}, a), u = n.$el.find('.property-sale a[data-value^="' + t + '"]'), l = [],
                            h = o.slice(r);
                        h.forEach(function (t) {
                            delete c[t]
                        }), e = s.where(c), e.forEach(function (e) {
                            var n = e.get(t);
                            l.indexOf(n) === -1 && l.push(n)
                        }), u.removeClass("disabled").filter(function () {
                            var t = i(this).data("value"), e = t.split(":")[1];
                            return i.inArray(e, l) === -1
                        }).addClass("disabled")
                    }
                })
            },
            activeSales: function () {
                var t = this, e = t.model.get("propSet");
                for (var n in e) t.$el.find('.property-sale a[data-value="' + e[n] + '"]').addClass("selected").siblings().removeClass("selected")
            },
            ctrlHandler: function (t) {
                t.preventDefault();
                var e = this, n = i(t.currentTarget), r = n.data("ctrl");
                e.toggleLayer(r)
            },
            handlerOpenProps: function () {
                var t = this;
                t.openProps()
            },
            toggleLayer: function (t, e) {
                var n = this, r = i("#" + t);
                r.length && (r.is(":visible") && !e ? (r.hide().removeClass("open"), "J_layerPackage" !== t && h.body.removeClass("lock"), "J_layerProps" === t && "#sibling" === location.hash && history.replaceState({}, "", location.href.slice(0, location.href.indexOf("#sibling")))) : (r.css("display", "").addClass("open"), h.body.addClass("lock"), n.contentIscroll(t)))
            },
            quickClose: function (t) {
                t.preventDefault();
                var e = this, n = i(t.currentTarget), r = n.parent().attr("id");
                e.toggleLayer(r)
            },
            contentIscroll: function (t) {
                var e = this;
                switch (t) {
                    case"J_layerPromo":
                        e.promoIscroll || (e.promoIscroll = new s("#J_layerPromo .layer-inner-bd"), document.querySelector("#J_layerPromo").addEventListener("touchmove", function (t) {
                            t.preventDefault()
                        }, !1));
                        break;
                    case"J_layerService":
                        e.serviceIscroll || (e.serviceIscroll = new s("#J_layerService .layer-inner-bd"), document.querySelector("#J_layerService").addEventListener("touchmove", function (t) {
                            t.preventDefault()
                        }, !1));
                        break;
                    case"J_layerProps":
                        e.propertyIscroll ? e.propertyIscroll.refresh() : (e.propertyIscroll = new s("#property", {click: !0}), document.querySelector("#J_layerProps").addEventListener("touchmove", function (t) {
                            t.preventDefault()
                        }, !1), e.propEnsure = !0);
                        break;
                    case"J_layerPackage":
                        e.packageIscroll || (e.packageIscroll = new s("#J_packageContent"), document.querySelector("#J_layerPackage").addEventListener("touchmove", function (t) {
                            t.preventDefault()
                        }, !1))
                }
            },
            closeProps: function () {
                i("#J_layerProps").hide().removeClass("open"), h.body.removeClass("lock")
            },
            openProps: function (t) {
                var e = this;
                switch (e.openPropType = t || "full", t) {
                    case"cart":
                        h.btnBuyPropsEnter.hide();
                        break;
                    case"buy":
                        h.btnAddCartProps.hide();
                        break;
                    default:
                        e.syncShow(), h.btnBuyPropsEnter.show()
                }
                e.toggleLayer("J_layerProps", !0)
            },
            syncShow: function () {
                var t = this, e = t.model, n = e.get("isSupportCart"), i = e.get("stock"), r = t.openPropType,
                    o = 1 === e.get("type") && 1 === e.get("activeStatus");
                return o && n ? "buy" === r ? void h.btnAddCartProps.hide() : void("cart" === r && i > 0 ? (h.btnCartAll.show(), h.btnBuyPropsEnter.hide()) : "cart" === r && i <= 0 ? (h.btnCartAll.hide(), h.btnBuyPropsEnter.show()) : "full" === r && i > 0 ? h.btnCartAll.show() : "full" === r && i <= 0 && h.btnCartAll.hide()) : (h.btnCartAll.hide(), void h.btnBuyPropsEnter.show())
            },
            setPackage: function (t, e) {
                t.preventDefault();
                var n = this, r = n.model, o = i(t.currentTarget), s = o.data("value"), a = o.text();
                o.hasClass("disabled") || (o.hasClass("selected") || (o.addClass("selected").siblings().removeClass("selected"), o.parent().hasClass("mod-tab") && h.packageLists.find('[data-value="' + s + '"]').addClass("selected").siblings().removeClass("selected"), n.model.set({activePackage: ""}, {silent: !0}), r.set({
                    activePackage: s,
                    packageName: a
                })), e || 0 === s || n.toggleLayer("J_layerPackage", !0))
            },
            setHuabei: function (t) {
                t.preventDefault();
                var e = this, n = e.model, r = i(t.currentTarget), o = r.data("value");
                r.hasClass("selected") ? (r.removeClass("selected"), n.set("periods", "")) : (r.addClass("selected").siblings().removeClass("selected"), n.set("periods", o))
            },
            handlerPackage: function (t, e) {
                var n, o, s = this, a = t.get("packageMap"), c = [];
                e && e.length ? (i.each(e, function (t, e) {
                    o = a[e], o.id = e, c.push(o)
                }), n = r.template(s.templatePackageItem), h.packageLists.html(n({packages: c})), packageStatusResult = s.getPackageStatus(c), packageStatusResult.avaiSkus.length ? h.packageLists.find('[data-value="' + packageStatusResult.avaiSkus[0] + '"]').trigger("tap", [!0]) : packageStatusResult.avaiPackages.length ? h.packageLists.find('[data-value="' + packageStatusResult.avaiPackages[0] + '"]').trigger("tap", [!0]) : t.set({
                    activePackage: "",
                    stock: 0,
                    buyButton: "售罄"
                })) : (t.set("activePackage", "", {silent: !0}), t.set({packageSkuIds: null, packageTotalPriceCent: 0}))
            },
            getPackageStatus: function (t) {
                var e, n, i = this, r = i.model, o = r.get("pvs"), s = {avaiSkus: [], avaiPackages: []},
                    a = r.get("initPvs");
                return t.forEach(function (t) {
                    e = o + "+" + t.id, n = i.getSkuModel(e), a == e && t.available ? s.avaiSkus.unshift(t.id) : t.available && n && 1 === n.stock ? s.avaiSkus.push(t.id) : t.available && s.avaiPackages.push(t.id)
                }), s
            },
            updateSummaryInfo: function () {
                var t = this.model, e = t.get("attributes"), n = t.get("packageName"), i = e;
                n && (i += " " + n), h.summaryName.text(i)
            },
            updatePrice: function (t, e) {
                var n = (e / 100).toFixed(2);
                h.price.text(n), h.packageBody.find(".sku-item .mod-tit em").text(n), this.setTotalPrice()
            },
            setTotalPrice: function () {
                var t = this, e = t.model, n = e.get("packageTotalPriceCent"), i = e.get("mainPriceCent");
                e.set("total", n + i)
            },
            updateCostPrice: function () {
                var t = this, e = t.model.get("costPriceCent"), n = t.model.get("mainPriceCent"),
                    i = t.model.get("packageTotalPriceCent"), r = t.model.get("packageTotalProfitsCent");
                e > 0 && n < e ? (i && (e = e + i + r), h.originalPrice.text("¥ " + (e / 100).toFixed(2)).show(), h.discountTag.show(), h.discountCountDown.show(), h.summaryDiscountCountDown.show()) : (h.originalPrice.empty().hide(), h.discountTag.hide(), h.discountCountDown.hide(), h.summaryDiscountCountDown.hide())
            },
            updateTotal: function (t, e) {
                var n, i = this, r = t.get("quantity");
                e = e || t.get("total"), n = e / 100 * r, h.price.text((e / 100).toFixed(2)), h.totalPrice.text(n.toFixed(2)), h.totalPricePackage.text(n.toFixed(2)), h.summaryPrice.text(n.toFixed(2)), i.huabeiRender()
            },
            activePackageItem: function (t) {
                var e = this, n = i(t.currentTarget);
                n.addClass("selected").siblings().removeClass("selected"), e.switchPackageItem(t.currentTarget), e.packageCalculate("activePackageItem"), e.updateCostPrice()
            },
            switchPackageItem: function (t) {
                var e, n = i(t), r = this, o = r.model, s = o.get("packageItems"), a = (n.data("sku"), n.data("sid")),
                    c = n.data("key");
                a && c && (e = s[a].cells[c], n.parents(".package-item").find(".package-item-pic img").attr({
                    src: l.imageUrlProcess(e.images, 240),
                    alt: e.names
                }))
            },
            ensurePackage: function () {
                var t = this;
                t.packageCalculate(), t.closePackage()
            },
            initDiscount: function () {
                var t, e = new Date;
                return t = e.getMonth() + 1 + "月" + e.getDate() + "日 " + (e.getHours() >= 10 ? e.getHours() : "0" + e.getHours()) + ":" + (e.getMinutes() >= 10 ? e.getMinutes() : "0" + e.getMinutes()) + " 准时开售"
            },
            isComingSale: function () {
                var t = this, e = t.model, n = !1;
                return 1 === e.get("type") && 2 === e.get("activeStatus") && (n = !0), n
            },
            distributeSubmit: function (t) {
                var e, n = this, r = 2 === n.model.get("type"), o = i(t.currentTarget);
                if (!o.hasClass("disabled") && !o.hasClass("locked")) {
                    if (o.hasClass("notlogin") || MZ.environment.checkL && !l.isLogin()) return void l.login();
                    if (e = n.validate(), !e.isValid) return n.openProps("buy"), void u.open(e.message);
                    if (!n.propEnsure) return void n.openProps("buy");
                    n.closeProps(), r ? n.panicBuyingSubmit() : n.submit(), d.lockButton(o), t.preventDefault(), t.stopPropagation()
                }
            },
            panicBuyingSubmit: function () {
                var t = this;
                v.getToken().done(function () {
                    t.panicBuyingStockStatus("buying")
                }), v._stockWhenOrderTimer = setInterval(function () {
                    t.panicBuyingStockStatus("ordering")
                }, 3e4)
            },
            panicBuyingStockStatus: function (t) {
                var e = this, n = e.model;
                p.getSkuSaleStatus(n).done(function (n) {
                    if (h.message.empty(), 1 === n.activeStatus) switch (n.stockStatus) {
                        case 1:
                            h.btnBuyAll.text("立即抢购").removeClass("disabled"), "buying" === t && v.orderToken && e.buyNow(v.orderToken);
                            break;
                        case 2:
                            h.btnBuyAll.text("还有机会").addClass("disabled"), h.message.html("该商品有用户下单后未付款，还有机会抢到");
                            break;
                        case 3:
                            h.btnBuyAll.text("已售罄").addClass("disabled")
                    } else 3 === n.activeStatus && (h.btnBuyAll.text("活动已结束").addClass("disabled"), e.model.set("activeStatus", 3));
                    (n.activeStatus > 1 || 1 == n.activeStatus && n.stockStatus > 1) && (v.state.isStackEmpty = !0, v.closeOrderModal())
                })
            },
            submit: function (t) {
                var e = this;
                return window.MZ && window.MZ.mcode ? e.buyNow() : void e.validateRemote().done(function () {
                    e.buyNow()
                }).fail(function (t) {
                    "login first" == t ? l.login() : t && u.open(t)
                })
            },
            validate: function () {
                var t = this, e = t.model, n = t.$el.find(".property-sale"), o = e.get("propSet"), s = e.get("propItem"),
                    a = e.get("quantity"), c = e.get("packageMap"), u = e.get("activePackage"), l = [], h = !0, d = "",
                    p = !1;
                return p = o && s.every(function (t) {
                    return "" !== o[t]
                }), i.each(s, function (t, e) {
                    var i;
                    o[e] || (i = n.eq(t).data("property"), l.push(i))
                }), r.isEmpty(c) || "" !== u || l.push("套餐"), l.length && (d = "请选择：" + l.join("、"), h = !1), isNaN(parseInt(a, 10)) && (d = "请确认输入了正确的商品数量", h = !1), {
                    isValid: h,
                    message: d
                }
            },
            validateRemote: function () {
                function t(t) {
                    var e, n = [], s = !0;
                    i.each(t, function (t, e) {
                        e || (n.push(t), s = !1)
                    }), s ? h.resolve() : (e = n[0] == r ? "商品" + o + " 已售罄" : "套餐中的 " + u[n[0]] + " 已售罄", h.reject(e))
                }

                var e = this, n = e.model, r = n.get("skuId"), o = n.get("names"), s = n.get("packageMap"),
                    a = n.get("activePackage"), c = n.get("packageSkuIds"), u = n.get("packageSet"), l = [],
                    h = i.Deferred();
                return l.push(r), a && c && c.length && (l = l.concat(c)), "" !== a && s[a] && (o = o + " " + s[a].name), i.ajax({
                    url: y.getStock,
                    type: "get",
                    data: {skuId: l.join(",")},
                    dataType: "json"
                }).done(function (e) {
                    e.success ? t(e.data) : h.reject(e.error)
                }).fail(function (t) {
                }), h.promise()
            },
            buyNow: function (t) {
                var e = this, n = e.model.toJSON(), r = n.packageSkuIds ? n.packageSkuIds.join(",") : "", o = i("<form>"),
                    s = ['<input type="hidden" name="sku_id" value="' + n.skuId + '" />', '<input type="hidden" name="numbers" value="' + n.quantity + '"/>', '<input type="hidden" name="package_id" value="' + n.activePackage + '" />', '<input type="hidden" name="package_list" value="' + r + '"/>'];
                window.MZ && window.MZ.mcode && s.push('<input type="hidden" name="mcode" value="' + window.MZ.mcode + '"/>'), t && s.push('<input type="hidden" name="token" value="' + t + '"/>'), g.isSupportHuabei && n.periods && s.push('<input type="hidden" name="periods" value="' + n.periods + '"/>'), o.attr({
                    action: y.orderAdd,
                    method: "GET"
                }).html(s.join("")).appendTo("body").submit()
            }
        });
    t.exports = b
}, function (t, e, n) {
    var i;
    /*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */
    !function (r, o, s) {
        function a(t, e) {
            this.wrapper = "string" == typeof t ? o.querySelector(t) : t, this.scroller = this.wrapper.children[0], this.scrollerStyle = this.scroller.style, this.options = {
                disablePointer: !u.hasPointer,
                disableTouch: u.hasPointer || !u.hasTouch,
                disableMouse: u.hasPointer || u.hasTouch,
                startX: 0,
                startY: 0,
                scrollY: !0,
                directionLockThreshold: 5,
                momentum: !0,
                bounce: !0,
                bounceTime: 600,
                bounceEasing: "",
                preventDefault: !0,
                preventDefaultException: {tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/},
                HWCompositing: !0,
                useTransition: !0,
                useTransform: !0,
                bindToWrapper: "undefined" == typeof r.onmousedown
            };
            for (var n in e) this.options[n] = e[n];
            this.translateZ = this.options.HWCompositing && u.hasPerspective ? " translateZ(0)" : "", this.options.useTransition = u.hasTransition && this.options.useTransition, this.options.useTransform = u.hasTransform && this.options.useTransform, this.options.eventPassthrough = this.options.eventPassthrough === !0 ? "vertical" : this.options.eventPassthrough, this.options.preventDefault = !this.options.eventPassthrough && this.options.preventDefault, this.options.scrollY = "vertical" != this.options.eventPassthrough && this.options.scrollY, this.options.scrollX = "horizontal" != this.options.eventPassthrough && this.options.scrollX, this.options.freeScroll = this.options.freeScroll && !this.options.eventPassthrough, this.options.directionLockThreshold = this.options.eventPassthrough ? 0 : this.options.directionLockThreshold, this.options.bounceEasing = "string" == typeof this.options.bounceEasing ? u.ease[this.options.bounceEasing] || u.ease.circular : this.options.bounceEasing, this.options.resizePolling = void 0 === this.options.resizePolling ? 60 : this.options.resizePolling, this.options.tap === !0 && (this.options.tap = "tap"), this.options.useTransition || this.options.useTransform || /relative|absolute/i.test(this.scrollerStyle.position) || (this.scrollerStyle.position = "relative"), this.x = 0, this.y = 0, this.directionX = 0, this.directionY = 0, this._events = {}, this._init(), this.refresh(), this.scrollTo(this.options.startX, this.options.startY), this.enable()
        }

        var c = r.requestAnimationFrame || r.webkitRequestAnimationFrame || r.mozRequestAnimationFrame || r.oRequestAnimationFrame || r.msRequestAnimationFrame || function (t) {
            r.setTimeout(t, 1e3 / 60)
        }, u = function () {
            function t(t) {
                return i !== !1 && ("" === i ? t : i + t.charAt(0).toUpperCase() + t.substr(1))
            }

            var e = {}, n = o.createElement("div").style, i = function () {
                for (var t, e = ["t", "webkitT", "MozT", "msT", "OT"], i = 0, r = e.length; i < r; i++) if (t = e[i] + "ransform", t in n) return e[i].substr(0, e[i].length - 1);
                return !1
            }();
            e.getTime = Date.now || function () {
                return (new Date).getTime()
            }, e.extend = function (t, e) {
                for (var n in e) t[n] = e[n]
            }, e.addEvent = function (t, e, n, i) {
                t.addEventListener(e, n, !!i)
            }, e.removeEvent = function (t, e, n, i) {
                t.removeEventListener(e, n, !!i)
            }, e.prefixPointerEvent = function (t) {
                return r.MSPointerEvent ? "MSPointer" + t.charAt(7).toUpperCase() + t.substr(8) : t
            }, e.momentum = function (t, e, n, i, r, o) {
                var a, c, u = t - e, l = s.abs(u) / n;
                return o = void 0 === o ? 6e-4 : o, a = t + l * l / (2 * o) * (u < 0 ? -1 : 1), c = l / o, a < i ? (a = r ? i - r / 2.5 * (l / 8) : i, u = s.abs(a - t), c = u / l) : a > 0 && (a = r ? r / 2.5 * (l / 8) : 0, u = s.abs(t) + a, c = u / l), {
                    destination: s.round(a),
                    duration: c
                }
            };
            var a = t("transform");
            return e.extend(e, {
                hasTransform: a !== !1,
                hasPerspective: t("perspective") in n,
                hasTouch: "ontouchstart" in r,
                hasPointer: !(!r.PointerEvent && !r.MSPointerEvent),
                hasTransition: t("transition") in n
            }), e.isBadAndroid = function () {
                var t = r.navigator.appVersion;
                if (/Android/.test(t) && !/Chrome\/\d/.test(t)) {
                    var e = t.match(/Safari\/(\d+.\d)/);
                    return !(e && "object" == typeof e && e.length >= 2) || parseFloat(e[1]) < 535.19
                }
                return !1
            }(), e.extend(e.style = {}, {
                transform: a,
                transitionTimingFunction: t("transitionTimingFunction"),
                transitionDuration: t("transitionDuration"),
                transitionDelay: t("transitionDelay"),
                transformOrigin: t("transformOrigin")
            }), e.hasClass = function (t, e) {
                var n = new RegExp("(^|\\s)" + e + "(\\s|$)");
                return n.test(t.className)
            }, e.addClass = function (t, n) {
                if (!e.hasClass(t, n)) {
                    var i = t.className.split(" ");
                    i.push(n), t.className = i.join(" ")
                }
            }, e.removeClass = function (t, n) {
                if (e.hasClass(t, n)) {
                    var i = new RegExp("(^|\\s)" + n + "(\\s|$)", "g");
                    t.className = t.className.replace(i, " ")
                }
            }, e.offset = function (t) {
                for (var e = -t.offsetLeft, n = -t.offsetTop; t = t.offsetParent;) e -= t.offsetLeft, n -= t.offsetTop;
                return {left: e, top: n}
            }, e.preventDefaultException = function (t, e) {
                for (var n in e) if (e[n].test(t[n])) return !0;
                return !1
            }, e.extend(e.eventType = {}, {
                touchstart: 1,
                touchmove: 1,
                touchend: 1,
                mousedown: 2,
                mousemove: 2,
                mouseup: 2,
                pointerdown: 3,
                pointermove: 3,
                pointerup: 3,
                MSPointerDown: 3,
                MSPointerMove: 3,
                MSPointerUp: 3
            }), e.extend(e.ease = {}, {
                quadratic: {
                    style: "cubic-bezier(0.25, 0.46, 0.45, 0.94)", fn: function (t) {
                        return t * (2 - t)
                    }
                }, circular: {
                    style: "cubic-bezier(0.1, 0.57, 0.1, 1)", fn: function (t) {
                        return s.sqrt(1 - --t * t)
                    }
                }, back: {
                    style: "cubic-bezier(0.175, 0.885, 0.32, 1.275)", fn: function (t) {
                        var e = 4;
                        return (t -= 1) * t * ((e + 1) * t + e) + 1
                    }
                }, bounce: {
                    style: "", fn: function (t) {
                        return (t /= 1) < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375
                    }
                }, elastic: {
                    style: "", fn: function (t) {
                        var e = .22, n = .4;
                        return 0 === t ? 0 : 1 == t ? 1 : n * s.pow(2, -10 * t) * s.sin((t - e / 4) * (2 * s.PI) / e) + 1
                    }
                }
            }), e.tap = function (t, e) {
                var n = o.createEvent("Event");
                n.initEvent(e, !0, !0), n.pageX = t.pageX, n.pageY = t.pageY, t.target.dispatchEvent(n)
            }, e.click = function (t) {
                var e, n = t.target;
                /(SELECT|INPUT|TEXTAREA)/i.test(n.tagName) || (e = o.createEvent(r.MouseEvent ? "MouseEvents" : "Event"), e.initEvent("click", !0, !0), e.view = t.view || r, e.detail = 1, e.screenX = n.screenX || 0, e.screenY = n.screenY || 0, e.clientX = n.clientX || 0, e.clientY = n.clientY || 0, e.ctrlKey = !!t.ctrlKey, e.altKey = !!t.altKey, e.shiftKey = !!t.shiftKey, e.metaKey = !!t.metaKey, e.button = 0, e.relatedTarget = null, e._constructed = !0, n.dispatchEvent(e))
            }, e
        }();
        a.prototype = {
            version: "5.2.0", _init: function () {
                this._initEvents()
            }, destroy: function () {
                this._initEvents(!0), clearTimeout(this.resizeTimeout), this.resizeTimeout = null, this._execEvent("destroy")
            }, _transitionEnd: function (t) {
                t.target == this.scroller && this.isInTransition && (this._transitionTime(), this.resetPosition(this.options.bounceTime) || (this.isInTransition = !1, this._execEvent("scrollEnd")))
            }, _start: function (t) {
                if (1 != u.eventType[t.type]) {
                    var e;
                    if (e = t.which ? t.button : t.button < 2 ? 0 : 4 == t.button ? 1 : 2, 0 !== e) return
                }
                if (this.enabled && (!this.initiated || u.eventType[t.type] === this.initiated)) {
                    !this.options.preventDefault || u.isBadAndroid || u.preventDefaultException(t.target, this.options.preventDefaultException) || t.preventDefault();
                    var n, i = t.touches ? t.touches[0] : t;
                    this.initiated = u.eventType[t.type], this.moved = !1, this.distX = 0, this.distY = 0, this.directionX = 0, this.directionY = 0, this.directionLocked = 0, this.startTime = u.getTime(), this.options.useTransition && this.isInTransition ? (this._transitionTime(), this.isInTransition = !1, n = this.getComputedPosition(), this._translate(s.round(n.x), s.round(n.y)), this._execEvent("scrollEnd")) : !this.options.useTransition && this.isAnimating && (this.isAnimating = !1, this._execEvent("scrollEnd")), this.startX = this.x, this.startY = this.y, this.absStartX = this.x, this.absStartY = this.y, this.pointX = i.pageX, this.pointY = i.pageY, this._execEvent("beforeScrollStart")
                }
            }, _move: function (t) {
                if (this.enabled && u.eventType[t.type] === this.initiated) {
                    this.options.preventDefault && t.preventDefault();
                    var e, n, i, r, o = t.touches ? t.touches[0] : t, a = o.pageX - this.pointX,
                        c = o.pageY - this.pointY, l = u.getTime();
                    if (this.pointX = o.pageX, this.pointY = o.pageY, this.distX += a, this.distY += c, i = s.abs(this.distX), r = s.abs(this.distY), !(l - this.endTime > 300 && i < 10 && r < 10)) {
                        if (this.directionLocked || this.options.freeScroll || (i > r + this.options.directionLockThreshold ? this.directionLocked = "h" : r >= i + this.options.directionLockThreshold ? this.directionLocked = "v" : this.directionLocked = "n"), "h" == this.directionLocked) {
                            if ("vertical" == this.options.eventPassthrough) t.preventDefault(); else if ("horizontal" == this.options.eventPassthrough) return void(this.initiated = !1);
                            c = 0
                        } else if ("v" == this.directionLocked) {
                            if ("horizontal" == this.options.eventPassthrough) t.preventDefault(); else if ("vertical" == this.options.eventPassthrough) return void(this.initiated = !1);
                            a = 0
                        }
                        a = this.hasHorizontalScroll ? a : 0, c = this.hasVerticalScroll ? c : 0, e = this.x + a, n = this.y + c, (e > 0 || e < this.maxScrollX) && (e = this.options.bounce ? this.x + a / 3 : e > 0 ? 0 : this.maxScrollX), (n > 0 || n < this.maxScrollY) && (n = this.options.bounce ? this.y + c / 3 : n > 0 ? 0 : this.maxScrollY), this.directionX = a > 0 ? -1 : a < 0 ? 1 : 0, this.directionY = c > 0 ? -1 : c < 0 ? 1 : 0, this.moved || this._execEvent("scrollStart"), this.moved = !0, this._translate(e, n), l - this.startTime > 300 && (this.startTime = l, this.startX = this.x, this.startY = this.y)
                    }
                }
            }, _end: function (t) {
                if (this.enabled && u.eventType[t.type] === this.initiated) {
                    this.options.preventDefault && !u.preventDefaultException(t.target, this.options.preventDefaultException) && t.preventDefault();
                    var e, n, i = (t.changedTouches ? t.changedTouches[0] : t, u.getTime() - this.startTime),
                        r = s.round(this.x), o = s.round(this.y), a = s.abs(r - this.startX),
                        c = s.abs(o - this.startY), l = 0, h = "";
                    if (this.isInTransition = 0, this.initiated = 0, this.endTime = u.getTime(), !this.resetPosition(this.options.bounceTime)) return this.scrollTo(r, o), this.moved ? this._events.flick && i < 200 && a < 100 && c < 100 ? void this._execEvent("flick") : (this.options.momentum && i < 300 && (e = this.hasHorizontalScroll ? u.momentum(this.x, this.startX, i, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : {
                        destination: r,
                        duration: 0
                    }, n = this.hasVerticalScroll ? u.momentum(this.y, this.startY, i, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : {
                        destination: o,
                        duration: 0
                    }, r = e.destination, o = n.destination, l = s.max(e.duration, n.duration), this.isInTransition = 1), r != this.x || o != this.y ? ((r > 0 || r < this.maxScrollX || o > 0 || o < this.maxScrollY) && (h = u.ease.quadratic), void this.scrollTo(r, o, l, h)) : void this._execEvent("scrollEnd")) : (this.options.tap && u.tap(t, this.options.tap), this.options.click && u.click(t), void this._execEvent("scrollCancel"))
                }
            }, _resize: function () {
                var t = this;
                clearTimeout(this.resizeTimeout), this.resizeTimeout = setTimeout(function () {
                    t.refresh()
                }, this.options.resizePolling)
            }, resetPosition: function (t) {
                var e = this.x, n = this.y;
                return t = t || 0, !this.hasHorizontalScroll || this.x > 0 ? e = 0 : this.x < this.maxScrollX && (e = this.maxScrollX), !this.hasVerticalScroll || this.y > 0 ? n = 0 : this.y < this.maxScrollY && (n = this.maxScrollY), (e != this.x || n != this.y) && (this.scrollTo(e, n, t, this.options.bounceEasing), !0)
            }, disable: function () {
                this.enabled = !1
            }, enable: function () {
                this.enabled = !0
            }, refresh: function () {
                this.wrapper.offsetHeight;
                this.wrapperWidth = this.wrapper.clientWidth, this.wrapperHeight = this.wrapper.clientHeight, this.scrollerWidth = this.scroller.offsetWidth, this.scrollerHeight = this.scroller.offsetHeight, this.maxScrollX = this.wrapperWidth - this.scrollerWidth, this.maxScrollY = this.wrapperHeight - this.scrollerHeight, this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0, this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0, this.hasHorizontalScroll || (this.maxScrollX = 0, this.scrollerWidth = this.wrapperWidth), this.hasVerticalScroll || (this.maxScrollY = 0, this.scrollerHeight = this.wrapperHeight), this.endTime = 0, this.directionX = 0, this.directionY = 0, this.wrapperOffset = u.offset(this.wrapper), this._execEvent("refresh"), this.resetPosition()
            }, on: function (t, e) {
                this._events[t] || (this._events[t] = []), this._events[t].push(e)
            }, off: function (t, e) {
                if (this._events[t]) {
                    var n = this._events[t].indexOf(e);
                    n > -1 && this._events[t].splice(n, 1)
                }
            }, _execEvent: function (t) {
                if (this._events[t]) {
                    var e = 0, n = this._events[t].length;
                    if (n) for (; e < n; e++) this._events[t][e].apply(this, [].slice.call(arguments, 1))
                }
            }, scrollBy: function (t, e, n, i) {
                t = this.x + t, e = this.y + e, n = n || 0, this.scrollTo(t, e, n, i)
            }, scrollTo: function (t, e, n, i) {
                i = i || u.ease.circular, this.isInTransition = this.options.useTransition && n > 0;
                var r = this.options.useTransition && i.style;
                !n || r ? (r && (this._transitionTimingFunction(i.style), this._transitionTime(n)), this._translate(t, e)) : this._animate(t, e, n, i.fn)
            }, scrollToElement: function (t, e, n, i, r) {
                if (t = t.nodeType ? t : this.scroller.querySelector(t)) {
                    var o = u.offset(t);
                    o.left -= this.wrapperOffset.left, o.top -= this.wrapperOffset.top, n === !0 && (n = s.round(t.offsetWidth / 2 - this.wrapper.offsetWidth / 2)), i === !0 && (i = s.round(t.offsetHeight / 2 - this.wrapper.offsetHeight / 2)), o.left -= n || 0, o.top -= i || 0, o.left = o.left > 0 ? 0 : o.left < this.maxScrollX ? this.maxScrollX : o.left, o.top = o.top > 0 ? 0 : o.top < this.maxScrollY ? this.maxScrollY : o.top, e = void 0 === e || null === e || "auto" === e ? s.max(s.abs(this.x - o.left), s.abs(this.y - o.top)) : e, this.scrollTo(o.left, o.top, e, r)
                }
            }, _transitionTime: function (t) {
                if (this.options.useTransition) {
                    t = t || 0;
                    var e = u.style.transitionDuration;
                    if (e && (this.scrollerStyle[e] = t + "ms", !t && u.isBadAndroid)) {
                        this.scrollerStyle[e] = "0.0001ms";
                        var n = this;
                        c(function () {
                            "0.0001ms" === n.scrollerStyle[e] && (n.scrollerStyle[e] = "0s")
                        })
                    }
                }
            }, _transitionTimingFunction: function (t) {
                this.scrollerStyle[u.style.transitionTimingFunction] = t
            }, _translate: function (t, e) {
                this.options.useTransform ? this.scrollerStyle[u.style.transform] = "translate(" + t + "px," + e + "px)" + this.translateZ : (t = s.round(t), e = s.round(e), this.scrollerStyle.left = t + "px", this.scrollerStyle.top = e + "px"), this.x = t, this.y = e
            }, _initEvents: function (t) {
                var e = t ? u.removeEvent : u.addEvent, n = this.options.bindToWrapper ? this.wrapper : r;
                e(r, "orientationchange", this), e(r, "resize", this), this.options.click && e(this.wrapper, "click", this, !0), this.options.disableMouse || (e(this.wrapper, "mousedown", this), e(n, "mousemove", this), e(n, "mousecancel", this), e(n, "mouseup", this)), u.hasPointer && !this.options.disablePointer && (e(this.wrapper, u.prefixPointerEvent("pointerdown"), this), e(n, u.prefixPointerEvent("pointermove"), this), e(n, u.prefixPointerEvent("pointercancel"), this), e(n, u.prefixPointerEvent("pointerup"), this)), u.hasTouch && !this.options.disableTouch && (e(this.wrapper, "touchstart", this), e(n, "touchmove", this), e(n, "touchcancel", this), e(n, "touchend", this)), e(this.scroller, "transitionend", this), e(this.scroller, "webkitTransitionEnd", this), e(this.scroller, "oTransitionEnd", this), e(this.scroller, "MSTransitionEnd", this)
            }, getComputedPosition: function () {
                var t, e, n = r.getComputedStyle(this.scroller, null);
                return this.options.useTransform ? (n = n[u.style.transform].split(")")[0].split(", "), t = +(n[12] || n[4]), e = +(n[13] || n[5])) : (t = +n.left.replace(/[^-\d.]/g, ""), e = +n.top.replace(/[^-\d.]/g, "")), {
                    x: t,
                    y: e
                }
            }, _animate: function (t, e, n, i) {
                function r() {
                    var d, p, f, v = u.getTime();
                    return v >= h ? (o.isAnimating = !1, o._translate(t, e), void(o.resetPosition(o.options.bounceTime) || o._execEvent("scrollEnd"))) : (v = (v - l) / n, f = i(v), d = (t - s) * f + s, p = (e - a) * f + a, o._translate(d, p), void(o.isAnimating && c(r)))
                }

                var o = this, s = this.x, a = this.y, l = u.getTime(), h = l + n;
                this.isAnimating = !0, r()
            }, handleEvent: function (t) {
                switch (t.type) {
                    case"touchstart":
                    case"pointerdown":
                    case"MSPointerDown":
                    case"mousedown":
                        this._start(t);
                        break;
                    case"touchmove":
                    case"pointermove":
                    case"MSPointerMove":
                    case"mousemove":
                        this._move(t);
                        break;
                    case"touchend":
                    case"pointerup":
                    case"MSPointerUp":
                    case"mouseup":
                    case"touchcancel":
                    case"pointercancel":
                    case"MSPointerCancel":
                    case"mousecancel":
                        this._end(t);
                        break;
                    case"orientationchange":
                    case"resize":
                        this._resize();
                        break;
                    case"transitionend":
                    case"webkitTransitionEnd":
                    case"oTransitionEnd":
                    case"MSTransitionEnd":
                        this._transitionEnd(t);
                        break;
                    case"wheel":
                    case"DOMMouseScroll":
                    case"mousewheel":
                        this._wheel(t);
                        break;
                    case"keydown":
                        this._key(t);
                        break;
                    case"click":
                        this.enabled && !t._constructed && (t.preventDefault(), t.stopPropagation())
                }
            }
        }, a.utils = u, "undefined" != typeof t && t.exports ? t.exports = a : (i = function () {
            return a
        }.call(e, n, e, t), !(void 0 !== i && (t.exports = i)))
    }(window, document, Math)
}, function (t, e, n) {
    var i;
    !function (r) {
        "use strict";

        function o(t) {
            var e, n, i, r = t.length - 1, o = "", s = t[0];
            if (r > 0) {
                for (o += s, e = 1; e < r; e++) i = t[e] + "", n = Lt - i.length, n && (o += m(n)), o += i;
                s = t[e], i = s + "", n = Lt - i.length, n && (o += m(n))
            } else if (0 === s) return "0";
            for (; s % 10 === 0;) s /= 10;
            return o + s
        }

        function s(t, e, n) {
            if (t !== ~~t || t < e || t > n) throw Error(Et + t)
        }

        function a(t, e, n, i) {
            var r, o, s, a;
            for (o = t[0]; o >= 10; o /= 10) --e;
            return --e < 0 ? (e += Lt, r = 0) : (r = Math.ceil((e + 1) / Lt), e %= Lt), o = At(10, Lt - e), a = t[r] % o | 0, null == i ? e < 3 ? (0 == e ? a = a / 100 | 0 : 1 == e && (a = a / 10 | 0), s = n < 4 && 99999 == a || n > 3 && 49999 == a || 5e4 == a || 0 == a) : s = (n < 4 && a + 1 == o || n > 3 && a + 1 == o / 2) && (t[r + 1] / o / 100 | 0) == At(10, e - 2) - 1 || (a == o / 2 || 0 == a) && 0 == (t[r + 1] / o / 100 | 0) : e < 4 ? (0 == e ? a = a / 1e3 | 0 : 1 == e ? a = a / 100 | 0 : 2 == e && (a = a / 10 | 0), s = (i || n < 4) && 9999 == a || !i && n > 3 && 4999 == a) : s = ((i || n < 4) && a + 1 == o || !i && n > 3 && a + 1 == o / 2) && (t[r + 1] / o / 1e3 | 0) == At(10, e - 3) - 1, s
        }

        function c(t, e, n) {
            for (var i, r, o = [0], s = 0, a = t.length; s < a;) {
                for (r = o.length; r--;) o[r] *= e;
                for (o[0] += wt.indexOf(t.charAt(s++)), i = 0; i < o.length; i++) o[i] > n - 1 && (void 0 === o[i + 1] && (o[i + 1] = 0), o[i + 1] += o[i] / n | 0, o[i] %= n)
            }
            return o.reverse()
        }

        function u(t, e) {
            var n, i, r = e.d.length;
            r < 32 ? (n = Math.ceil(r / 3), i = Math.pow(4, -n).toString()) : (n = 16, i = "2.3283064365386962890625e-10"), t.precision += n, e = E(t, 1, e.times(i), new t(1));
            for (var o = n; o--;) {
                var s = e.times(e);
                e = s.times(s).minus(s).times(8).plus(1)
            }
            return t.precision -= n, e
        }

        function l(t, e, n, i) {
            var r, o, s, a, c, u, l, h, d, p = t.constructor;
            t:if (null != e) {
                if (h = t.d, !h) return t;
                for (r = 1, a = h[0]; a >= 10; a /= 10) r++;
                if (o = e - r, o < 0) o += Lt, s = e, l = h[d = 0], c = l / At(10, r - s - 1) % 10 | 0; else if (d = Math.ceil((o + 1) / Lt), a = h.length, d >= a) {
                    if (!i) break t;
                    for (; a++ <= d;) h.push(0);
                    l = c = 0, r = 1, o %= Lt, s = o - Lt + 1
                } else {
                    for (l = a = h[d], r = 1; a >= 10; a /= 10) r++;
                    o %= Lt, s = o - Lt + r, c = s < 0 ? 0 : l / At(10, r - s - 1) % 10 | 0
                }
                if (i = i || e < 0 || void 0 !== h[d + 1] || (s < 0 ? l : l % At(10, r - s - 1)), u = n < 4 ? (c || i) && (0 == n || n == (t.s < 0 ? 3 : 2)) : c > 5 || 5 == c && (4 == n || i || 6 == n && (o > 0 ? s > 0 ? l / At(10, r - s) : 0 : h[d - 1]) % 10 & 1 || n == (t.s < 0 ? 8 : 7)), e < 1 || !h[0]) return h.length = 0, u ? (e -= t.e + 1, h[0] = At(10, (Lt - e % Lt) % Lt), t.e = -e || 0) : h[0] = t.e = 0, t;
                if (0 == o ? (h.length = d, a = 1, d--) : (h.length = d + 1, a = At(10, Lt - o), h[d] = s > 0 ? (l / At(10, r - s) % At(10, s) | 0) * a : 0), u) for (; ;) {
                    if (0 == d) {
                        for (o = 1, s = h[0]; s >= 10; s /= 10) o++;
                        for (s = h[0] += a, a = 1; s >= 10; s /= 10) a++;
                        o != a && (t.e++, h[0] == jt && (h[0] = 1));
                        break
                    }
                    if (h[d] += a, h[d] != jt) break;
                    h[d--] = 0, a = 1
                }
                for (o = h.length; 0 === h[--o];) h.pop()
            }
            return Tt && (t.e > p.maxE ? (t.d = null, t.e = NaN) : t.e < p.minE && (t.e = 0, t.d = [0])), t
        }

        function h(t, e, n) {
            if (!t.isFinite()) return k(t);
            var i, r = t.e, s = o(t.d), a = s.length;
            return e ? (n && (i = n - a) > 0 ? s = s.charAt(0) + "." + s.slice(1) + m(i) : a > 1 && (s = s.charAt(0) + "." + s.slice(1)), s = s + (t.e < 0 ? "e" : "e+") + t.e) : r < 0 ? (s = "0." + m(-r - 1) + s, n && (i = n - a) > 0 && (s += m(i))) : r >= a ? (s += m(r + 1 - a), n && (i = n - r - 1) > 0 && (s = s + "." + m(i))) : ((i = r + 1) < a && (s = s.slice(0, i) + "." + s.slice(i)), n && (i = n - a) > 0 && (r + 1 === a && (s += "."), s += m(i))), s
        }

        function d(t, e) {
            var n = t[0];
            for (e *= Lt; n >= 10; n /= 10) e++;
            return e
        }

        function p(t, e, n) {
            if (e > Bt) throw Tt = !0, n && (t.precision = n), Error(Pt);
            return l(new t(_t), e, 1, !0)
        }

        function f(t, e, n) {
            if (e > qt) throw Error(Pt);
            return l(new t(kt), e, n, !0)
        }

        function v(t) {
            var e = t.length - 1, n = e * Lt + 1;
            if (e = t[e]) {
                for (; e % 10 == 0; e /= 10) n--;
                for (e = t[0]; e >= 10; e /= 10) n++
            }
            return n
        }

        function m(t) {
            for (var e = ""; t--;) e += "0";
            return e
        }

        function g(t, e, n, i) {
            var r, o = new t(1), s = Math.ceil(i / Lt + 4);
            for (Tt = !1; ;) {
                if (n % 2 && (o = o.times(e), I(o.d, s) && (r = !0)), n = It(n / 2), 0 === n) {
                    n = o.d.length - 1, r && 0 === o.d[n] && ++o.d[n];
                    break
                }
                e = e.times(e), I(e.d, s)
            }
            return Tt = !0, o
        }

        function y(t) {
            return 1 & t.d[t.d.length - 1]
        }

        function b(t, e, n) {
            for (var i, r = new t(e[0]), o = 0; ++o < e.length;) {
                if (i = new t(e[o]), !i.s) {
                    r = i;
                    break
                }
                r[n](i) && (r = i)
            }
            return r
        }

        function w(t, e) {
            var n, i, r, s, c, u, h, d = 0, p = 0, f = 0, v = t.constructor, m = v.rounding, g = v.precision;
            if (!t.d || !t.d[0] || t.e > 17) return new v(t.d ? t.d[0] ? t.s < 0 ? 0 : 1 / 0 : 1 : t.s ? t.s < 0 ? 0 : t : NaN);
            for (null == e ? (Tt = !1, h = g) : h = e, u = new v(.03125); t.e > -2;) t = t.times(u), f += 5;
            for (i = Math.log(At(2, f)) / Math.LN10 * 2 + 5 | 0, h += i, n = s = c = new v(1), v.precision = h; ;) {
                if (s = l(s.times(t), h, 1), n = n.times(++p), u = c.plus(Ft(s, n, h, 1)), o(u.d).slice(0, h) === o(c.d).slice(0, h)) {
                    for (r = f; r--;) c = l(c.times(c), h, 1);
                    if (null != e) return v.precision = g, c;
                    if (!(d < 3 && a(c.d, h - i, m, d))) return l(c, v.precision = g, m, Tt = !0);
                    v.precision = h += 10, n = s = u = new v(1), p = 0, d++
                }
                c = u
            }
        }

        function _(t, e) {
            var n, i, r, s, c, u, h, d, f, v, m, g = 1, y = 10, b = t, w = b.d, k = b.constructor, x = k.rounding,
                T = k.precision;
            if (b.s < 0 || !w || !w[0] || !b.e && 1 == w[0] && 1 == w.length) return new k(w && !w[0] ? -1 / 0 : 1 != b.s ? NaN : w ? 0 : b);
            if (null == e ? (Tt = !1, f = T) : f = e, k.precision = f += y, n = o(w), i = n.charAt(0), !(Math.abs(s = b.e) < 15e14)) return d = p(k, f + 2, T).times(s + ""), b = _(new k(i + "." + n.slice(1)), f - y).plus(d), k.precision = T, null == e ? l(b, T, x, Tt = !0) : b;
            for (; i < 7 && 1 != i || 1 == i && n.charAt(1) > 3;) b = b.times(t), n = o(b.d), i = n.charAt(0), g++;
            for (s = b.e, i > 1 ? (b = new k("0." + n), s++) : b = new k(i + "." + n.slice(1)), v = b, h = c = b = Ft(b.minus(1), b.plus(1), f, 1), m = l(b.times(b), f, 1), r = 3; ;) {
                if (c = l(c.times(m), f, 1), d = h.plus(Ft(c, new k(r), f, 1)), o(d.d).slice(0, f) === o(h.d).slice(0, f)) {
                    if (h = h.times(2), 0 !== s && (h = h.plus(p(k, f + 2, T).times(s + ""))), h = Ft(h, new k(g), f, 1), null != e) return k.precision = T, h;
                    if (!a(h.d, f - y, x, u)) return l(h, k.precision = T, x, Tt = !0);
                    k.precision = f += y, d = c = b = Ft(v.minus(1), v.plus(1), f, 1), m = l(b.times(b), f, 1), r = u = 1
                }
                h = d, r += 2
            }
        }

        function k(t) {
            return String(t.s * t.s / 0)
        }

        function x(t, e) {
            var n, i, r;
            for ((n = e.indexOf(".")) > -1 && (e = e.replace(".", "")), (i = e.search(/e/i)) > 0 ? (n < 0 && (n = i), n += +e.slice(i + 1), e = e.substring(0, i)) : n < 0 && (n = e.length), i = 0; 48 === e.charCodeAt(i); i++) ;
            for (r = e.length; 48 === e.charCodeAt(r - 1); --r) ;
            if (e = e.slice(i, r)) {
                if (r -= i, t.e = n = n - i - 1, t.d = [], i = (n + 1) % Lt, n < 0 && (i += Lt), i < r) {
                    for (i && t.d.push(+e.slice(0, i)), r -= Lt; i < r;) t.d.push(+e.slice(i, i += Lt));
                    e = e.slice(i), i = Lt - e.length
                } else i -= r;
                for (; i--;) e += "0";
                t.d.push(+e), Tt && (t.e > t.constructor.maxE ? (t.d = null, t.e = NaN) : t.e < t.constructor.minE && (t.e = 0, t.d = [0]))
            } else t.e = 0, t.d = [0];
            return t
        }

        function T(t, e) {
            var n, i, r, o, s, a, u, l, h;
            if ("Infinity" === e || "NaN" === e) return +e || (t.s = NaN), t.e = NaN, t.d = null, t;
            if (Dt.test(e)) n = 16, e = e.toLowerCase(); else if (Mt.test(e)) n = 2; else {
                if (!Nt.test(e)) throw Error(Et + e);
                n = 8
            }
            for (o = e.search(/p/i), o > 0 ? (u = +e.slice(o + 1), e = e.substring(2, o)) : e = e.slice(2), o = e.indexOf("."), s = o >= 0, i = t.constructor, s && (e = e.replace(".", ""), a = e.length, o = a - o, r = g(i, new i(n), o, 2 * o)), l = c(e, n, jt), h = l.length - 1, o = h; 0 === l[o]; --o) l.pop();
            return o < 0 ? new i(0 * t.s) : (t.e = d(l, h), t.d = l, Tt = !1, s && (t = Ft(t, r, 4 * a)), u && (t = t.times(Math.abs(u) < 54 ? Math.pow(2, u) : vt.pow(2, u))), Tt = !0, t)
        }

        function S(t, e) {
            var n, i = e.d.length;
            if (i < 3) return E(t, 2, e, e);
            n = 1.4 * Math.sqrt(i), n = n > 16 ? 16 : 0 | n, e = e.times(Math.pow(5, -n)), e = E(t, 2, e, e);
            for (var r, o = new t(5), s = new t(16), a = new t(20); n--;) r = e.times(e), e = e.times(o.plus(r.times(s.times(r).minus(a))));
            return e
        }

        function E(t, e, n, i, r) {
            var o, s, a, c, u = 1, l = t.precision, h = Math.ceil(l / Lt);
            for (Tt = !1, c = n.times(n), a = new t(i); ;) {
                if (s = Ft(a.times(c), new t(e++ * e++), l, 1), a = r ? i.plus(s) : i.minus(s), i = Ft(s.times(c), new t(e++ * e++), l, 1), s = a.plus(i), void 0 !== s.d[h]) {
                    for (o = h; s.d[o] === a.d[o] && o--;) ;
                    if (o == -1) break
                }
                o = a, a = i, i = s, s = o, u++
            }
            return Tt = !0, s.d.length = h + 1, s
        }

        function P(t, e) {
            var n, i = e.s < 0, r = f(t, t.precision, 1), o = r.times(.5);
            if (e = e.abs(), e.lte(o)) return gt = i ? 4 : 1, e;
            if (n = e.divToInt(r), n.isZero()) gt = i ? 3 : 2; else {
                if (e = e.minus(n.times(r)), e.lte(o)) return gt = y(n) ? i ? 2 : 3 : i ? 4 : 1, e;
                gt = y(n) ? i ? 1 : 4 : i ? 3 : 2
            }
            return e.minus(r).abs()
        }

        function C(t, e, n, i) {
            var r, o, a, u, l, d, p, f, v, m = t.constructor, g = void 0 !== n;
            if (g ? (s(n, 1, bt), void 0 === i ? i = m.rounding : s(i, 0, 8)) : (n = m.precision, i = m.rounding), t.isFinite()) {
                for (p = h(t), a = p.indexOf("."), g ? (r = 2, 16 == e ? n = 4 * n - 3 : 8 == e && (n = 3 * n - 2)) : r = e, a >= 0 && (p = p.replace(".", ""), v = new m(1), v.e = p.length - a, v.d = c(h(v), 10, r), v.e = v.d.length), f = c(p, 10, r), o = l = f.length; 0 == f[--l];) f.pop();
                if (f[0]) {
                    if (a < 0 ? o-- : (t = new m(t), t.d = f, t.e = o, t = Ft(t, v, n, i, 0, r), f = t.d, o = t.e, d = mt), a = f[n], u = r / 2, d = d || void 0 !== f[n + 1], d = i < 4 ? (void 0 !== a || d) && (0 === i || i === (t.s < 0 ? 3 : 2)) : a > u || a === u && (4 === i || d || 6 === i && 1 & f[n - 1] || i === (t.s < 0 ? 8 : 7)), f.length = n, d) for (; ++f[--n] > r - 1;) f[n] = 0, n || (++o, f.unshift(1));
                    for (l = f.length; !f[l - 1]; --l) ;
                    for (a = 0, p = ""; a < l; a++) p += wt.charAt(f[a]);
                    if (g) {
                        if (l > 1) if (16 == e || 8 == e) {
                            for (a = 16 == e ? 4 : 3, --l; l % a; l++) p += "0";
                            for (f = c(p, r, e), l = f.length; !f[l - 1]; --l) ;
                            for (a = 1, p = "1."; a < l; a++) p += wt.charAt(f[a])
                        } else p = p.charAt(0) + "." + p.slice(1);
                        p = p + (o < 0 ? "p" : "p+") + o
                    } else if (o < 0) {
                        for (; ++o;) p = "0" + p;
                        p = "0." + p
                    } else if (++o > l) for (o -= l; o--;) p += "0"; else o < l && (p = p.slice(0, o) + "." + p.slice(o))
                } else p = g ? "0p+0" : "0";
                p = (16 == e ? "0x" : 2 == e ? "0b" : 8 == e ? "0o" : "") + p
            } else p = k(t);
            return t.s < 0 ? "-" + p : p
        }

        function I(t, e) {
            if (t.length > e) return t.length = e, !0
        }

        function A(t) {
            return new this(t).abs()
        }

        function M(t) {
            return new this(t).acos()
        }

        function D(t) {
            return new this(t).acosh()
        }

        function N(t, e) {
            return new this(t).plus(e)
        }

        function O(t) {
            return new this(t).asin()
        }

        function j(t) {
            return new this(t).asinh()
        }

        function L(t) {
            return new this(t).atan()
        }

        function z(t) {
            return new this(t).atanh()
        }

        function B(t, e) {
            t = new this(t), e = new this(e);
            var n, i = this.precision, r = this.rounding, o = i + 4;
            return t.s && e.s ? t.d || e.d ? !e.d || t.isZero() ? (n = e.s < 0 ? f(this, i, r) : new this(0), n.s = t.s) : !t.d || e.isZero() ? (n = f(this, o, 1).times(.5), n.s = t.s) : e.s < 0 ? (this.precision = o, this.rounding = 1, n = this.atan(Ft(t, e, o, 1)), e = f(this, o, 1), this.precision = i, this.rounding = r, n = t.s < 0 ? n.minus(e) : n.plus(e)) : n = this.atan(Ft(t, e, o, 1)) : (n = f(this, o, 1).times(e.s > 0 ? .25 : .75), n.s = t.s) : n = new this(NaN), n
        }

        function q(t) {
            return new this(t).cbrt()
        }

        function R(t) {
            return l(t = new this(t), t.e + 1, 2)
        }

        function F(t) {
            if (!t || "object" != typeof t) throw Error(St + "Object expected");
            var e, n, i, r = t.defaults === !0,
                o = ["precision", 1, bt, "rounding", 0, 8, "toExpNeg", -yt, 0, "toExpPos", 0, yt, "maxE", 0, yt, "minE", -yt, 0, "modulo", 0, 9];
            for (e = 0; e < o.length; e += 3) if (n = o[e], r && (this[n] = xt[n]), void 0 !== (i = t[n])) {
                if (!(It(i) === i && i >= o[e + 1] && i <= o[e + 2])) throw Error(Et + n + ": " + i);
                this[n] = i
            }
            if (n = "crypto", r && (this[n] = xt[n]), void 0 !== (i = t[n])) {
                if (i !== !0 && i !== !1 && 0 !== i && 1 !== i) throw Error(Et + n + ": " + i);
                if (i) {
                    if ("undefined" == typeof crypto || !crypto || !crypto.getRandomValues && !crypto.randomBytes) throw Error(Ct);
                    this[n] = !0
                } else this[n] = !1
            }
            return this
        }

        function H(t) {
            return new this(t).cos()
        }

        function X(t) {
            return new this(t).cosh()
        }

        function Y(t) {
            function e(t) {
                var n, i, r, o = this;
                if (!(o instanceof e)) return new e(t);
                if (o.constructor = e, t instanceof e) return o.s = t.s, o.e = t.e, void(o.d = (t = t.d) ? t.slice() : t);
                if (r = typeof t, "number" === r) {
                    if (0 === t) return o.s = 1 / t < 0 ? -1 : 1, o.e = 0, void(o.d = [0]);
                    if (t < 0 ? (t = -t, o.s = -1) : o.s = 1, t === ~~t && t < 1e7) {
                        for (n = 0, i = t; i >= 10; i /= 10) n++;
                        return o.e = n, void(o.d = [t])
                    }
                    return 0 * t !== 0 ? (t || (o.s = NaN), o.e = NaN, void(o.d = null)) : x(o, t.toString())
                }
                if ("string" !== r) throw Error(Et + t);
                return 45 === t.charCodeAt(0) ? (t = t.slice(1), o.s = -1) : o.s = 1, Ot.test(t) ? x(o, t) : T(o, t)
            }

            var n, i, r;
            if (e.prototype = Rt, e.ROUND_UP = 0, e.ROUND_DOWN = 1, e.ROUND_CEIL = 2, e.ROUND_FLOOR = 3, e.ROUND_HALF_UP = 4, e.ROUND_HALF_DOWN = 5, e.ROUND_HALF_EVEN = 6, e.ROUND_HALF_CEIL = 7, e.ROUND_HALF_FLOOR = 8, e.EUCLID = 9, e.config = e.set = F, e.clone = Y, e.isDecimal = V, e.abs = A, e.acos = M, e.acosh = D, e.add = N, e.asin = O, e.asinh = j, e.atan = L, e.atanh = z, e.atan2 = B, e.cbrt = q, e.ceil = R, e.cos = H, e.cosh = X, e.div = $, e.exp = J, e.floor = U, e.hypot = W, e.ln = Z, e.log = K, e.log10 = G, e.log2 = Q, e.max = tt, e.min = et, e.mod = nt, e.mul = it, e.pow = rt, e.random = ot, e.round = st, e.sign = at, e.sin = ct, e.sinh = ut, e.sqrt = lt, e.sub = ht, e.tan = dt, e.tanh = pt, e.trunc = ft, void 0 === t && (t = {}), t && t.defaults !== !0) for (r = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], n = 0; n < r.length;) t.hasOwnProperty(i = r[n++]) || (t[i] = this[i]);
            return e.config(t), e
        }

        function $(t, e) {
            return new this(t).div(e)
        }

        function J(t) {
            return new this(t).exp()
        }

        function U(t) {
            return l(t = new this(t), t.e + 1, 3)
        }

        function W() {
            var t, e, n = new this(0);
            for (Tt = !1, t = 0; t < arguments.length;) if (e = new this(arguments[t++]), e.d) n.d && (n = n.plus(e.times(e))); else {
                if (e.s) return Tt = !0, new this(1 / 0);
                n = e
            }
            return Tt = !0, n.sqrt()
        }

        function V(t) {
            return t instanceof vt || t && "[object Decimal]" === t.name || !1
        }

        function Z(t) {
            return new this(t).ln()
        }

        function K(t, e) {
            return new this(t).log(e)
        }

        function Q(t) {
            return new this(t).log(2)
        }

        function G(t) {
            return new this(t).log(10)
        }

        function tt() {
            return b(this, arguments, "lt")
        }

        function et() {
            return b(this, arguments, "gt")
        }

        function nt(t, e) {
            return new this(t).mod(e)
        }

        function it(t, e) {
            return new this(t).mul(e)
        }

        function rt(t, e) {
            return new this(t).pow(e)
        }

        function ot(t) {
            var e, n, i, r, o = 0, a = new this(1), c = [];
            if (void 0 === t ? t = this.precision : s(t, 1, bt), i = Math.ceil(t / Lt), this.crypto) if (crypto.getRandomValues) for (e = crypto.getRandomValues(new Uint32Array(i)); o < i;) r = e[o], r >= 429e7 ? e[o] = crypto.getRandomValues(new Uint32Array(1))[0] : c[o++] = r % 1e7; else {
                if (!crypto.randomBytes) throw Error(Ct);
                for (e = crypto.randomBytes(i *= 4); o < i;) r = e[o] + (e[o + 1] << 8) + (e[o + 2] << 16) + ((127 & e[o + 3]) << 24), r >= 214e7 ? crypto.randomBytes(4).copy(e, o) : (c.push(r % 1e7), o += 4);
                o = i / 4
            } else for (; o < i;) c[o++] = 1e7 * Math.random() | 0;
            for (i = c[--o], t %= Lt, i && t && (r = At(10, Lt - t), c[o] = (i / r | 0) * r); 0 === c[o]; o--) c.pop();
            if (o < 0) n = 0, c = [0]; else {
                for (n = -1; 0 === c[0]; n -= Lt) c.shift();
                for (i = 1, r = c[0]; r >= 10; r /= 10) i++;
                i < Lt && (n -= Lt - i)
            }
            return a.e = n, a.d = c, a
        }

        function st(t) {
            return l(t = new this(t), t.e + 1, this.rounding)
        }

        function at(t) {
            return t = new this(t), t.d ? t.d[0] ? t.s : 0 * t.s : t.s || NaN
        }

        function ct(t) {
            return new this(t).sin()
        }

        function ut(t) {
            return new this(t).sinh()
        }

        function lt(t) {
            return new this(t).sqrt()
        }

        function ht(t, e) {
            return new this(t).sub(e)
        }

        function dt(t) {
            return new this(t).tan()
        }

        function pt(t) {
            return new this(t).tanh()
        }

        function ft(t) {
            return l(t = new this(t), t.e + 1, 1)
        }

        var vt, mt, gt, yt = 9e15, bt = 1e9, wt = "0123456789abcdef",
            _t = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",
            kt = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",
            xt = {precision: 20, rounding: 4, modulo: 1, toExpNeg: -7, toExpPos: 21, minE: -yt, maxE: yt, crypto: !1},
            Tt = !0, St = "[DecimalError] ", Et = St + "Invalid argument: ", Pt = St + "Precision limit exceeded",
            Ct = St + "crypto unavailable", It = Math.floor, At = Math.pow,
            Mt = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,
            Dt = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,
            Nt = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, Ot = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, jt = 1e7,
            Lt = 7, zt = 9007199254740991, Bt = _t.length - 1, qt = kt.length - 1, Rt = {name: "[object Decimal]"};
        Rt.absoluteValue = Rt.abs = function () {
            var t = new this.constructor(this);
            return t.s < 0 && (t.s = 1), l(t)
        }, Rt.ceil = function () {
            return l(new this.constructor(this), this.e + 1, 2)
        }, Rt.comparedTo = Rt.cmp = function (t) {
            var e, n, i, r, o = this, s = o.d, a = (t = new o.constructor(t)).d, c = o.s, u = t.s;
            if (!s || !a) return c && u ? c !== u ? c : s === a ? 0 : !s ^ c < 0 ? 1 : -1 : NaN;
            if (!s[0] || !a[0]) return s[0] ? c : a[0] ? -u : 0;
            if (c !== u) return c;
            if (o.e !== t.e) return o.e > t.e ^ c < 0 ? 1 : -1;
            for (i = s.length, r = a.length, e = 0, n = i < r ? i : r; e < n; ++e) if (s[e] !== a[e]) return s[e] > a[e] ^ c < 0 ? 1 : -1;
            return i === r ? 0 : i > r ^ c < 0 ? 1 : -1
        }, Rt.cosine = Rt.cos = function () {
            var t, e, n = this, i = n.constructor;
            return n.d ? n.d[0] ? (t = i.precision, e = i.rounding, i.precision = t + Math.max(n.e, n.sd()) + Lt, i.rounding = 1, n = u(i, P(i, n)), i.precision = t, i.rounding = e, l(2 == gt || 3 == gt ? n.neg() : n, t, e, !0)) : new i(1) : new i(NaN)
        }, Rt.cubeRoot = Rt.cbrt = function () {
            var t, e, n, i, r, s, a, c, u, h, d = this, p = d.constructor;
            if (!d.isFinite() || d.isZero()) return new p(d);
            for (Tt = !1, s = d.s * Math.pow(d.s * d, 1 / 3), s && Math.abs(s) != 1 / 0 ? i = new p(s.toString()) : (n = o(d.d), t = d.e, (s = (t - n.length + 1) % 3) && (n += 1 == s || s == -2 ? "0" : "00"), s = Math.pow(n, 1 / 3), t = It((t + 1) / 3) - (t % 3 == (t < 0 ? -1 : 2)), s == 1 / 0 ? n = "5e" + t : (n = s.toExponential(), n = n.slice(0, n.indexOf("e") + 1) + t), i = new p(n), i.s = d.s), a = (t = p.precision) + 3; ;) if (c = i,
                    u = c.times(c).times(c), h = u.plus(d), i = Ft(h.plus(d).times(c), h.plus(u), a + 2, 1), o(c.d).slice(0, a) === (n = o(i.d)).slice(0, a)) {
                if (n = n.slice(a - 3, a + 1), "9999" != n && (r || "4999" != n)) {
                    +n && (+n.slice(1) || "5" != n.charAt(0)) || (l(i, t + 1, 1), e = !i.times(i).times(i).eq(d));
                    break
                }
                if (!r && (l(c, t + 1, 0), c.times(c).times(c).eq(d))) {
                    i = c;
                    break
                }
                a += 4, r = 1
            }
            return Tt = !0, l(i, t, p.rounding, e)
        }, Rt.decimalPlaces = Rt.dp = function () {
            var t, e = this.d, n = NaN;
            if (e) {
                if (t = e.length - 1, n = (t - It(this.e / Lt)) * Lt, t = e[t]) for (; t % 10 == 0; t /= 10) n--;
                n < 0 && (n = 0)
            }
            return n
        }, Rt.dividedBy = Rt.div = function (t) {
            return Ft(this, new this.constructor(t))
        }, Rt.dividedToIntegerBy = Rt.divToInt = function (t) {
            var e = this, n = e.constructor;
            return l(Ft(e, new n(t), 0, 1, 1), n.precision, n.rounding)
        }, Rt.equals = Rt.eq = function (t) {
            return 0 === this.cmp(t)
        }, Rt.floor = function () {
            return l(new this.constructor(this), this.e + 1, 3)
        }, Rt.greaterThan = Rt.gt = function (t) {
            return this.cmp(t) > 0
        }, Rt.greaterThanOrEqualTo = Rt.gte = function (t) {
            var e = this.cmp(t);
            return 1 == e || 0 === e
        }, Rt.hyperbolicCosine = Rt.cosh = function () {
            var t, e, n, i, r, o = this, s = o.constructor, a = new s(1);
            if (!o.isFinite()) return new s(o.s ? 1 / 0 : NaN);
            if (o.isZero()) return a;
            n = s.precision, i = s.rounding, s.precision = n + Math.max(o.e, o.sd()) + 4, s.rounding = 1, r = o.d.length, r < 32 ? (t = Math.ceil(r / 3), e = Math.pow(4, -t).toString()) : (t = 16, e = "2.3283064365386962890625e-10"), o = E(s, 1, o.times(e), new s(1), !0);
            for (var c, u = t, h = new s(8); u--;) c = o.times(o), o = a.minus(c.times(h.minus(c.times(h))));
            return l(o, s.precision = n, s.rounding = i, !0)
        }, Rt.hyperbolicSine = Rt.sinh = function () {
            var t, e, n, i, r = this, o = r.constructor;
            if (!r.isFinite() || r.isZero()) return new o(r);
            if (e = o.precision, n = o.rounding, o.precision = e + Math.max(r.e, r.sd()) + 4, o.rounding = 1, i = r.d.length, i < 3) r = E(o, 2, r, r, !0); else {
                t = 1.4 * Math.sqrt(i), t = t > 16 ? 16 : 0 | t, r = r.times(Math.pow(5, -t)), r = E(o, 2, r, r, !0);
                for (var s, a = new o(5), c = new o(16), u = new o(20); t--;) s = r.times(r), r = r.times(a.plus(s.times(c.times(s).plus(u))))
            }
            return o.precision = e, o.rounding = n, l(r, e, n, !0)
        }, Rt.hyperbolicTangent = Rt.tanh = function () {
            var t, e, n = this, i = n.constructor;
            return n.isFinite() ? n.isZero() ? new i(n) : (t = i.precision, e = i.rounding, i.precision = t + 7, i.rounding = 1, Ft(n.sinh(), n.cosh(), i.precision = t, i.rounding = e)) : new i(n.s)
        }, Rt.inverseCosine = Rt.acos = function () {
            var t, e = this, n = e.constructor, i = e.abs().cmp(1), r = n.precision, o = n.rounding;
            return i !== -1 ? 0 === i ? e.isNeg() ? f(n, r, o) : new n(0) : new n(NaN) : e.isZero() ? f(n, r + 4, o).times(.5) : (n.precision = r + 6, n.rounding = 1, e = e.asin(), t = f(n, r + 4, o).times(.5), n.precision = r, n.rounding = o, t.minus(e))
        }, Rt.inverseHyperbolicCosine = Rt.acosh = function () {
            var t, e, n = this, i = n.constructor;
            return n.lte(1) ? new i(n.eq(1) ? 0 : NaN) : n.isFinite() ? (t = i.precision, e = i.rounding, i.precision = t + Math.max(Math.abs(n.e), n.sd()) + 4, i.rounding = 1, Tt = !1, n = n.times(n).minus(1).sqrt().plus(n), Tt = !0, i.precision = t, i.rounding = e, n.ln()) : new i(n)
        }, Rt.inverseHyperbolicSine = Rt.asinh = function () {
            var t, e, n = this, i = n.constructor;
            return !n.isFinite() || n.isZero() ? new i(n) : (t = i.precision, e = i.rounding, i.precision = t + 2 * Math.max(Math.abs(n.e), n.sd()) + 6, i.rounding = 1, Tt = !1, n = n.times(n).plus(1).sqrt().plus(n), Tt = !0, i.precision = t, i.rounding = e, n.ln())
        }, Rt.inverseHyperbolicTangent = Rt.atanh = function () {
            var t, e, n, i, r = this, o = r.constructor;
            return r.isFinite() ? r.e >= 0 ? new o(r.abs().eq(1) ? r.s / 0 : r.isZero() ? r : NaN) : (t = o.precision, e = o.rounding, i = r.sd(), Math.max(i, t) < 2 * -r.e - 1 ? l(new o(r), t, e, !0) : (o.precision = n = i - r.e, r = Ft(r.plus(1), new o(1).minus(r), n + t, 1), o.precision = t + 4, o.rounding = 1, r = r.ln(), o.precision = t, o.rounding = e, r.times(.5))) : new o(NaN)
        }, Rt.inverseSine = Rt.asin = function () {
            var t, e, n, i, r = this, o = r.constructor;
            return r.isZero() ? new o(r) : (e = r.abs().cmp(1), n = o.precision, i = o.rounding, e !== -1 ? 0 === e ? (t = f(o, n + 4, i).times(.5), t.s = r.s, t) : new o(NaN) : (o.precision = n + 6, o.rounding = 1, r = r.div(new o(1).minus(r.times(r)).sqrt().plus(1)).atan(), o.precision = n, o.rounding = i, r.times(2)))
        }, Rt.inverseTangent = Rt.atan = function () {
            var t, e, n, i, r, o, s, a, c, u = this, h = u.constructor, d = h.precision, p = h.rounding;
            if (u.isFinite()) {
                if (u.isZero()) return new h(u);
                if (u.abs().eq(1) && d + 4 <= qt) return s = f(h, d + 4, p).times(.25), s.s = u.s, s
            } else {
                if (!u.s) return new h(NaN);
                if (d + 4 <= qt) return s = f(h, d + 4, p).times(.5), s.s = u.s, s
            }
            for (h.precision = a = d + 10, h.rounding = 1, n = Math.min(28, a / Lt + 2 | 0), t = n; t; --t) u = u.div(u.times(u).plus(1).sqrt().plus(1));
            for (Tt = !1, e = Math.ceil(a / Lt), i = 1, c = u.times(u), s = new h(u), r = u; t !== -1;) if (r = r.times(c), o = s.minus(r.div(i += 2)), r = r.times(c), s = o.plus(r.div(i += 2)), void 0 !== s.d[e]) for (t = e; s.d[t] === o.d[t] && t--;) ;
            return n && (s = s.times(2 << n - 1)), Tt = !0, l(s, h.precision = d, h.rounding = p, !0)
        }, Rt.isFinite = function () {
            return !!this.d
        }, Rt.isInteger = Rt.isInt = function () {
            return !!this.d && It(this.e / Lt) > this.d.length - 2
        }, Rt.isNaN = function () {
            return !this.s
        }, Rt.isNegative = Rt.isNeg = function () {
            return this.s < 0
        }, Rt.isPositive = Rt.isPos = function () {
            return this.s > 0
        }, Rt.isZero = function () {
            return !!this.d && 0 === this.d[0]
        }, Rt.lessThan = Rt.lt = function (t) {
            return this.cmp(t) < 0
        }, Rt.lessThanOrEqualTo = Rt.lte = function (t) {
            return this.cmp(t) < 1
        }, Rt.logarithm = Rt.log = function (t) {
            var e, n, i, r, s, c, u, h, d = this, f = d.constructor, v = f.precision, m = f.rounding, g = 5;
            if (null == t) t = new f(10), e = !0; else {
                if (t = new f(t), n = t.d, t.s < 0 || !n || !n[0] || t.eq(1)) return new f(NaN);
                e = t.eq(10)
            }
            if (n = d.d, d.s < 0 || !n || !n[0] || d.eq(1)) return new f(n && !n[0] ? -1 / 0 : 1 != d.s ? NaN : n ? 0 : 1 / 0);
            if (e) if (n.length > 1) s = !0; else {
                for (r = n[0]; r % 10 === 0;) r /= 10;
                s = 1 !== r
            }
            if (Tt = !1, u = v + g, c = _(d, u), i = e ? p(f, u + 10) : _(t, u), h = Ft(c, i, u, 1), a(h.d, r = v, m)) do if (u += 10, c = _(d, u), i = e ? p(f, u + 10) : _(t, u), h = Ft(c, i, u, 1), !s) {
                +o(h.d).slice(r + 1, r + 15) + 1 == 1e14 && (h = l(h, v + 1, 0));
                break
            } while (a(h.d, r += 10, m));
            return Tt = !0, l(h, v, m)
        }, Rt.minus = Rt.sub = function (t) {
            var e, n, i, r, o, s, a, c, u, h, p, f, v = this, m = v.constructor;
            if (t = new m(t), !v.d || !t.d) return v.s && t.s ? v.d ? t.s = -t.s : t = new m(t.d || v.s !== t.s ? v : NaN) : t = new m(NaN), t;
            if (v.s != t.s) return t.s = -t.s, v.plus(t);
            if (u = v.d, f = t.d, a = m.precision, c = m.rounding, !u[0] || !f[0]) {
                if (f[0]) t.s = -t.s; else {
                    if (!u[0]) return new m(3 === c ? -0 : 0);
                    t = new m(v)
                }
                return Tt ? l(t, a, c) : t
            }
            if (n = It(t.e / Lt), h = It(v.e / Lt), u = u.slice(), o = h - n) {
                for (p = o < 0, p ? (e = u, o = -o, s = f.length) : (e = f, n = h, s = u.length), i = Math.max(Math.ceil(a / Lt), s) + 2, o > i && (o = i, e.length = 1), e.reverse(), i = o; i--;) e.push(0);
                e.reverse()
            } else {
                for (i = u.length, s = f.length, p = i < s, p && (s = i), i = 0; i < s; i++) if (u[i] != f[i]) {
                    p = u[i] < f[i];
                    break
                }
                o = 0
            }
            for (p && (e = u, u = f, f = e, t.s = -t.s), s = u.length, i = f.length - s; i > 0; --i) u[s++] = 0;
            for (i = f.length; i > o;) {
                if (u[--i] < f[i]) {
                    for (r = i; r && 0 === u[--r];) u[r] = jt - 1;
                    --u[r], u[i] += jt
                }
                u[i] -= f[i]
            }
            for (; 0 === u[--s];) u.pop();
            for (; 0 === u[0]; u.shift()) --n;
            return u[0] ? (t.d = u, t.e = d(u, n), Tt ? l(t, a, c) : t) : new m(3 === c ? -0 : 0)
        }, Rt.modulo = Rt.mod = function (t) {
            var e, n = this, i = n.constructor;
            return t = new i(t), !n.d || !t.s || t.d && !t.d[0] ? new i(NaN) : !t.d || n.d && !n.d[0] ? l(new i(n), i.precision, i.rounding) : (Tt = !1, 9 == i.modulo ? (e = Ft(n, t.abs(), 0, 3, 1), e.s *= t.s) : e = Ft(n, t, 0, i.modulo, 1), e = e.times(t), Tt = !0, n.minus(e))
        }, Rt.naturalExponential = Rt.exp = function () {
            return w(this)
        }, Rt.naturalLogarithm = Rt.ln = function () {
            return _(this)
        }, Rt.negated = Rt.neg = function () {
            var t = new this.constructor(this);
            return t.s = -t.s, l(t)
        }, Rt.plus = Rt.add = function (t) {
            var e, n, i, r, o, s, a, c, u, h, p = this, f = p.constructor;
            if (t = new f(t), !p.d || !t.d) return p.s && t.s ? p.d || (t = new f(t.d || p.s === t.s ? p : NaN)) : t = new f(NaN), t;
            if (p.s != t.s) return t.s = -t.s, p.minus(t);
            if (u = p.d, h = t.d, a = f.precision, c = f.rounding, !u[0] || !h[0]) return h[0] || (t = new f(p)), Tt ? l(t, a, c) : t;
            if (o = It(p.e / Lt), i = It(t.e / Lt), u = u.slice(), r = o - i) {
                for (r < 0 ? (n = u, r = -r, s = h.length) : (n = h, i = o, s = u.length), o = Math.ceil(a / Lt), s = o > s ? o + 1 : s + 1, r > s && (r = s, n.length = 1), n.reverse(); r--;) n.push(0);
                n.reverse()
            }
            for (s = u.length, r = h.length, s - r < 0 && (r = s, n = h, h = u, u = n), e = 0; r;) e = (u[--r] = u[r] + h[r] + e) / jt | 0, u[r] %= jt;
            for (e && (u.unshift(e), ++i), s = u.length; 0 == u[--s];) u.pop();
            return t.d = u, t.e = d(u, i), Tt ? l(t, a, c) : t
        }, Rt.precision = Rt.sd = function (t) {
            var e, n = this;
            if (void 0 !== t && t !== !!t && 1 !== t && 0 !== t) throw Error(Et + t);
            return n.d ? (e = v(n.d), t && n.e + 1 > e && (e = n.e + 1)) : e = NaN, e
        }, Rt.round = function () {
            var t = this, e = t.constructor;
            return l(new e(t), t.e + 1, e.rounding)
        }, Rt.sine = Rt.sin = function () {
            var t, e, n = this, i = n.constructor;
            return n.isFinite() ? n.isZero() ? new i(n) : (t = i.precision, e = i.rounding, i.precision = t + Math.max(n.e, n.sd()) + Lt, i.rounding = 1, n = S(i, P(i, n)), i.precision = t, i.rounding = e, l(gt > 2 ? n.neg() : n, t, e, !0)) : new i(NaN)
        }, Rt.squareRoot = Rt.sqrt = function () {
            var t, e, n, i, r, s, a = this, c = a.d, u = a.e, h = a.s, d = a.constructor;
            if (1 !== h || !c || !c[0]) return new d(!h || h < 0 && (!c || c[0]) ? NaN : c ? a : 1 / 0);
            for (Tt = !1, h = Math.sqrt(+a), 0 == h || h == 1 / 0 ? (e = o(c), (e.length + u) % 2 == 0 && (e += "0"), h = Math.sqrt(e), u = It((u + 1) / 2) - (u < 0 || u % 2), h == 1 / 0 ? e = "1e" + u : (e = h.toExponential(), e = e.slice(0, e.indexOf("e") + 1) + u), i = new d(e)) : i = new d(h.toString()), n = (u = d.precision) + 3; ;) if (s = i, i = s.plus(Ft(a, s, n + 2, 1)).times(.5), o(s.d).slice(0, n) === (e = o(i.d)).slice(0, n)) {
                if (e = e.slice(n - 3, n + 1), "9999" != e && (r || "4999" != e)) {
                    +e && (+e.slice(1) || "5" != e.charAt(0)) || (l(i, u + 1, 1), t = !i.times(i).eq(a));
                    break
                }
                if (!r && (l(s, u + 1, 0), s.times(s).eq(a))) {
                    i = s;
                    break
                }
                n += 4, r = 1
            }
            return Tt = !0, l(i, u, d.rounding, t)
        }, Rt.tangent = Rt.tan = function () {
            var t, e, n = this, i = n.constructor;
            return n.isFinite() ? n.isZero() ? new i(n) : (t = i.precision, e = i.rounding, i.precision = t + 10, i.rounding = 1, n = n.sin(), n.s = 1, n = Ft(n, new i(1).minus(n.times(n)).sqrt(), t + 10, 0), i.precision = t, i.rounding = e, l(2 == gt || 4 == gt ? n.neg() : n, t, e, !0)) : new i(NaN)
        }, Rt.times = Rt.mul = function (t) {
            var e, n, i, r, o, s, a, c, u, h = this, p = h.constructor, f = h.d, v = (t = new p(t)).d;
            if (t.s *= h.s, !(f && f[0] && v && v[0])) return new p(!t.s || f && !f[0] && !v || v && !v[0] && !f ? NaN : f && v ? 0 * t.s : t.s / 0);
            for (n = It(h.e / Lt) + It(t.e / Lt), c = f.length, u = v.length, c < u && (o = f, f = v, v = o, s = c, c = u, u = s), o = [], s = c + u, i = s; i--;) o.push(0);
            for (i = u; --i >= 0;) {
                for (e = 0, r = c + i; r > i;) a = o[r] + v[i] * f[r - i - 1] + e, o[r--] = a % jt | 0, e = a / jt | 0;
                o[r] = (o[r] + e) % jt | 0
            }
            for (; !o[--s];) o.pop();
            return e ? ++n : o.shift(), t.d = o, t.e = d(o, n), Tt ? l(t, p.precision, p.rounding) : t
        }, Rt.toBinary = function (t, e) {
            return C(this, 2, t, e)
        }, Rt.toDecimalPlaces = Rt.toDP = function (t, e) {
            var n = this, i = n.constructor;
            return n = new i(n), void 0 === t ? n : (s(t, 0, bt), void 0 === e ? e = i.rounding : s(e, 0, 8), l(n, t + n.e + 1, e))
        }, Rt.toExponential = function (t, e) {
            var n, i = this, r = i.constructor;
            return void 0 === t ? n = h(i, !0) : (s(t, 0, bt), void 0 === e ? e = r.rounding : s(e, 0, 8), i = l(new r(i), t + 1, e), n = h(i, !0, t + 1)), i.isNeg() && !i.isZero() ? "-" + n : n
        }, Rt.toFixed = function (t, e) {
            var n, i, r = this, o = r.constructor;
            return void 0 === t ? n = h(r) : (s(t, 0, bt), void 0 === e ? e = o.rounding : s(e, 0, 8), i = l(new o(r), t + r.e + 1, e), n = h(i, !1, t + i.e + 1)), r.isNeg() && !r.isZero() ? "-" + n : n
        }, Rt.toFraction = function (t) {
            var e, n, i, r, s, a, c, u, l, h, d, p, f = this, m = f.d, g = f.constructor;
            if (!m) return new g(f);
            if (l = n = new g(1), i = u = new g(0), e = new g(i), s = e.e = v(m) - f.e - 1, a = s % Lt, e.d[0] = At(10, a < 0 ? Lt + a : a), null == t) t = s > 0 ? e : l; else {
                if (c = new g(t), !c.isInt() || c.lt(l)) throw Error(Et + c);
                t = c.gt(e) ? s > 0 ? e : l : c
            }
            for (Tt = !1, c = new g(o(m)), h = g.precision, g.precision = s = m.length * Lt * 2; d = Ft(c, e, 0, 1, 1), r = n.plus(d.times(i)), 1 != r.cmp(t);) n = i, i = r, r = l, l = u.plus(d.times(r)), u = r, r = e, e = c.minus(d.times(r)), c = r;
            return r = Ft(t.minus(n), i, 0, 1, 1), u = u.plus(r.times(l)), n = n.plus(r.times(i)), u.s = l.s = f.s, p = Ft(l, i, s, 1).minus(f).abs().cmp(Ft(u, n, s, 1).minus(f).abs()) < 1 ? [l, i] : [u, n], g.precision = h, Tt = !0, p
        }, Rt.toHexadecimal = Rt.toHex = function (t, e) {
            return C(this, 16, t, e)
        }, Rt.toNearest = function (t, e) {
            var n = this, i = n.constructor;
            if (n = new i(n), null == t) {
                if (!n.d) return n;
                t = new i(1), e = i.rounding
            } else {
                if (t = new i(t), void 0 !== e && s(e, 0, 8), !n.d) return t.s ? n : t;
                if (!t.d) return t.s && (t.s = n.s), t
            }
            return t.d[0] ? (Tt = !1, e < 4 && (e = [4, 5, 7, 8][e]), n = Ft(n, t, 0, e, 1).times(t), Tt = !0, l(n)) : (t.s = n.s, n = t), n
        }, Rt.toNumber = function () {
            return +this
        }, Rt.toOctal = function (t, e) {
            return C(this, 8, t, e)
        }, Rt.toPower = Rt.pow = function (t) {
            var e, n, i, r, s, c, u = this, h = u.constructor, d = +(t = new h(t));
            if (!(u.d && t.d && u.d[0] && t.d[0])) return new h(At(+u, d));
            if (u = new h(u), u.eq(1)) return u;
            if (i = h.precision, s = h.rounding, t.eq(1)) return l(u, i, s);
            if (e = It(t.e / Lt), e >= t.d.length - 1 && (n = d < 0 ? -d : d) <= zt) return r = g(h, u, n, i), t.s < 0 ? new h(1).div(r) : l(r, i, s);
            if (c = u.s, c < 0) {
                if (e < t.d.length - 1) return new h(NaN);
                if (0 == (1 & t.d[e]) && (c = 1), 0 == u.e && 1 == u.d[0] && 1 == u.d.length) return u.s = c, u
            }
            return n = At(+u, d), e = 0 != n && isFinite(n) ? new h(n + "").e : It(d * (Math.log("0." + o(u.d)) / Math.LN10 + u.e + 1)), e > h.maxE + 1 || e < h.minE - 1 ? new h(e > 0 ? c / 0 : 0) : (Tt = !1, h.rounding = u.s = 1, n = Math.min(12, (e + "").length), r = w(t.times(_(u, i + n)), i), r.d && (r = l(r, i + 5, 1), a(r.d, i, s) && (e = i + 10, r = l(w(t.times(_(u, e + n)), e), e + 5, 1), +o(r.d).slice(i + 1, i + 15) + 1 == 1e14 && (r = l(r, i + 1, 0)))), r.s = c, Tt = !0, h.rounding = s, l(r, i, s))
        }, Rt.toPrecision = function (t, e) {
            var n, i = this, r = i.constructor;
            return void 0 === t ? n = h(i, i.e <= r.toExpNeg || i.e >= r.toExpPos) : (s(t, 1, bt), void 0 === e ? e = r.rounding : s(e, 0, 8), i = l(new r(i), t, e), n = h(i, t <= i.e || i.e <= r.toExpNeg, t)), i.isNeg() && !i.isZero() ? "-" + n : n
        }, Rt.toSignificantDigits = Rt.toSD = function (t, e) {
            var n = this, i = n.constructor;
            return void 0 === t ? (t = i.precision, e = i.rounding) : (s(t, 1, bt), void 0 === e ? e = i.rounding : s(e, 0, 8)), l(new i(n), t, e)
        }, Rt.toString = function () {
            var t = this, e = t.constructor, n = h(t, t.e <= e.toExpNeg || t.e >= e.toExpPos);
            return t.isNeg() && !t.isZero() ? "-" + n : n
        }, Rt.truncated = Rt.trunc = function () {
            return l(new this.constructor(this), this.e + 1, 1)
        }, Rt.valueOf = Rt.toJSON = function () {
            var t = this, e = t.constructor, n = h(t, t.e <= e.toExpNeg || t.e >= e.toExpPos);
            return t.isNeg() ? "-" + n : n
        };
        var Ft = function () {
            function t(t, e, n) {
                var i, r = 0, o = t.length;
                for (t = t.slice(); o--;) i = t[o] * e + r, t[o] = i % n | 0, r = i / n | 0;
                return r && t.unshift(r), t
            }

            function e(t, e, n, i) {
                var r, o;
                if (n != i) o = n > i ? 1 : -1; else for (r = o = 0; r < n; r++) if (t[r] != e[r]) {
                    o = t[r] > e[r] ? 1 : -1;
                    break
                }
                return o
            }

            function n(t, e, n, i) {
                for (var r = 0; n--;) t[n] -= r, r = t[n] < e[n] ? 1 : 0, t[n] = r * i + t[n] - e[n];
                for (; !t[0] && t.length > 1;) t.shift()
            }

            return function (i, r, o, s, a, c) {
                var u, h, d, p, f, v, m, g, y, b, w, _, k, x, T, S, E, P, C, I, A = i.constructor,
                    M = i.s == r.s ? 1 : -1, D = i.d, N = r.d;
                if (!(D && D[0] && N && N[0])) return new A(i.s && r.s && (D ? !N || D[0] != N[0] : N) ? D && 0 == D[0] || !N ? 0 * M : M / 0 : NaN);
                for (c ? (f = 1, h = i.e - r.e) : (c = jt, f = Lt, h = It(i.e / f) - It(r.e / f)), C = N.length, E = D.length, y = new A(M), b = y.d = [], d = 0; N[d] == (D[d] || 0); d++) ;
                if (N[d] > (D[d] || 0) && h--, null == o ? (x = o = A.precision, s = A.rounding) : x = a ? o + (i.e - r.e) + 1 : o, x < 0) b.push(1), v = !0; else {
                    if (x = x / f + 2 | 0, d = 0, 1 == C) {
                        for (p = 0, N = N[0], x++; (d < E || p) && x--; d++) T = p * c + (D[d] || 0), b[d] = T / N | 0, p = T % N | 0;
                        v = p || d < E
                    } else {
                        for (p = c / (N[0] + 1) | 0, p > 1 && (N = t(N, p, c), D = t(D, p, c), C = N.length, E = D.length), S = C, w = D.slice(0, C), _ = w.length; _ < C;) w[_++] = 0;
                        I = N.slice(), I.unshift(0), P = N[0], N[1] >= c / 2 && ++P;
                        do p = 0, u = e(N, w, C, _), u < 0 ? (k = w[0], C != _ && (k = k * c + (w[1] || 0)), p = k / P | 0, p > 1 ? (p >= c && (p = c - 1), m = t(N, p, c), g = m.length, _ = w.length, u = e(m, w, g, _), 1 == u && (p--, n(m, C < g ? I : N, g, c))) : (0 == p && (u = p = 1), m = N.slice()), g = m.length, g < _ && m.unshift(0), n(w, m, _, c), u == -1 && (_ = w.length, u = e(N, w, C, _), u < 1 && (p++, n(w, C < _ ? I : N, _, c))), _ = w.length) : 0 === u && (p++, w = [0]), b[d++] = p, u && w[0] ? w[_++] = D[S] || 0 : (w = [D[S]], _ = 1); while ((S++ < E || void 0 !== w[0]) && x--);
                        v = void 0 !== w[0]
                    }
                    b[0] || b.shift()
                }
                if (1 == f) y.e = h, mt = v; else {
                    for (d = 1, p = b[0]; p >= 10; p /= 10) d++;
                    y.e = d + h * f - 1, l(y, a ? o + y.e + 1 : o, s, v)
                }
                return y
            }
        }();
        vt = Y(xt), vt.default = vt.Decimal = vt, _t = new vt(_t), kt = new vt(kt), i = function () {
            return vt
        }.call(e, n, e, t), !(void 0 !== i && (t.exports = i))
    }(this)
}, function (t, e) {
    var n = {
        body: $(document.body),
        price: $("#J_price"),
        totalPrice: $("#J_totalPrice"),
        totalPricePackage: $("#J_totalPricePackage"),
        packageLists: $("#J_packageLists"),
        packageTab: $("#J_packageTab"),
        packageContent: $("#J_packageContent"),
        packageBody: $("#J_packageBody"),
        imgBooth: $("#J_imgBooth"),
        previewThumb: $("#J_previewThumb"),
        propertyPackage: $("#propertyPackage"),
        quantity: $("#J_quantity"),
        selectedProps: $("#J_selectedProps"),
        selectedQuantity: $("#J_selectedQuantity"),
        property: $("#property"),
        serverTime: $("#servertime"),
        message: $("#J_sanpUp"),
        btnBuyPropsEnter: $("#J_btnBuyPropsEnter"),
        summaryPrice: $("#J_summaryPrice"),
        summaryName: $("#J_summaryName"),
        discountTag: $("#J_discountTag"),
        originalPrice: $("#J_originalPrice"),
        discountCountDown: $("#J_discountCountDown"),
        summaryDiscountCountDown: $("#J_summaryDiscountCountDown"),
        installment: $("#J_prodInstallment"),
        btnAddCart: $("#J_btnAddCart"),
        btnAddCartProps: $("#J_btnAddCartProps"),
        btnCartAll: $("#J_btnAddCart").add("#J_btnAddCartProps"),
        btnBuy: $("#J_btnBuyNow"),
        btnBuyProp: $("#J_btnBuyPropsEnter"),
        btnBuyAll: $("#J_btnBuyNow").add("#J_btnBuyPropsEnter"),
        limit: $("#J_Stock"),
        huabeiBd: $("#J_huabeiBody")
    };
    t.exports = n
}, function (t, e, n) {
    function i(t) {
        if (t && t.length) return t = t.sort(function (t, e) {
            return t.id < e.id ? -1 : t.id > e.id ? 1 : 0
        })
    }

    /*!
	 * view-extra.js
	 * @date 2017.7.25
	 * @author chenjinghui@meizu.com
	 * @version 0.0.1
	 */
    var r = n(29), o = (n(37), n(45)), s = {getSkuSaleStatus: "//detail.mall.meizu.com/api/sku/sale_status"};
    e.quantityMinus = function (t) {
        t.preventDefault();
        var e = r(t.currentTarget), n = e.siblings("span"), i = n.data("value");
        e.hasClass("disabled") || (i = isNaN(parseInt(i, 10)) ? 1 : parseInt(i, 10) - 1, i <= 0 && (i = 1), this.model.set("quantity", i))
    }, e.quantityPlus = function (t) {
        t.preventDefault();
        var e = r(t.currentTarget), n = e.siblings("span"), i = n.data("max"), o = n.data("value");
        e.hasClass("disabled") || (o = isNaN(parseInt(o, 10)) ? 1 : parseInt(o, 10) + 1, i && o >= i ? o = i : o > 500 && (o = 500), this.model.set("quantity", o))
    }, e.goSibling = function (t) {
        t.preventDefault(), location.href = t.currentTarget.href
    }, e.goBack = function () {
        var t = function () {
            var t = ["ordercenter.mall.meizu.com"];
            return t.some(function (t) {
                return document.referrer.match(t)
            })
        };
        try {
            !document.referrer || t() ? location.href = "//mall.meizu.com/" : document.referrer && history.back()
        } catch (t) {
            location.href = "//mall.meizu.com/"
        }
    }, e.lineRecommendPvs = function (t, e) {
        var n = this, o = n.model.get("propItem"), s = n.collection, a = {done: !1, stockPvs: "", noStockPvs: ""};
        return a.done = o.some(function (n, o) {
            if (o > t) {
                var c, u = r.extend({}, e);
                if (delete u[n], c = s.where(u), c && c.length) return c = i(c), c.some(function (t) {
                    var e = t.get("stock");
                    return a.noStockPvs || (a.noStockPvs = t.id), e && (a.done = !0, a.stockPvs = t.id), 1 === e
                })
            }
            return !1
        }), a
    }, e.pointRecommendPvs = function (t, e) {
        var n, r = this, o = r.model.get("propItem"), s = r.collection, a = {done: !1, stockPvs: "", noStockPvs: ""};
        return o.reduce(function (e, n) {
            return n != t && delete e[n], e
        }, e), n = s.where(e), n && n.length && (n = i(n), a.done = n.some(function (t) {
            var e = t.get("stock");
            return a.noStockPvs || (a.noStockPvs = t.id), e && (a.done = !0, a.stockPvs = t.id), 1 === e
        })), a
    }, e.getSkuSaleStatus = function (t) {
        var e = 2 === t.get("type"), n = t.get("skuId"), i = t.get("activePackage"), r = t.get("packageSkuIds"),
            a = {skuId: n};
        return e && (a.packageId = i ? i : "", a.packageSkuIdList = r ? r.join(",") : ""), o.ajax(s.getSkuSaleStatus, a, "get", "json")
    }
}, function (t, e, n) {
    var i = n(30), r = n(31), o = {};
    i.extend(o, r.Events), t.exports = window._PageEvents = o
}, function (t, e, n) {
    var i = n(29), r = n(57), o = n(45);
    n(59);
    var s = n(55), a = window.MZ.modelData, c = {getToken: "//pyramid.mall.meizu.com/queue/token"}, u = {
        orderToken: 0, state: {isStackEmpty: !1}, startOrderModal: function () {
            var t = this,
                e = '<div class="bi-dialog" id="J_dialogOrder"><div class="bi-dialog-inner"><div class="bi-dialog-hd"></div><div class="bi-dialog-bd tcenter"><img class="dialog-cont-pic" src="//mall.res.meizu.com/detail/img/lineup.gif"></div><p class="dialog-cont-text">参加活动的人数较多，正在为您排队，请稍候！<br/>无需刷新页面，排队自动进行中……</p><div class="bi-dialog-ft"></div></div><a class="bi-close" id="J_DialogClose" href="javascript:;"><i class="icon icon-close"></i></a></div>';
            t.state.isStackEmpty || (window.scrollTo(0, 0), t.orderDialog = dialog({
                width: 280,
                height: 210,
                content: e,
                zIndex: 1e5,
                onshow: function () {
                    i("#J_DialogClose").on("click.dialog", function () {
                        t.closeOrderModal()
                    }), s.body.addClass("lock")
                },
                onclose: function () {
                    i("#J_DialogClose").off("click.dialog"), t.closeOrderModal()
                },
                backdropOpacity: .4
            }).showModal())
        }, closeOrderModal: function () {
            var t = this;
            t._modalTimer && window.clearTimeout(t._modalTimer), t._tokenTimer && window.clearInterval(t._tokenTimer), t._stockWhenOrderTimer && window.clearInterval(t._stockWhenOrderTimer), t.orderDialog && (t.orderDialog.remove(), t.orderDialog = !1, s.body.removeClass("lock"))
        }, getToken: function () {
            function t() {
                i.ajax({
                    url: c.getToken,
                    type: "get",
                    data: {itemId: a.itemId},
                    dataType: "jsonp"
                }).done(function (t) {
                    t.success ? (e.orderToken = t.data, n.resolve(t.data, t), e.closeOrderModal()) : e.executeTokenException(t.errorCode || t.code)
                })
            }

            var e = this, n = i.Deferred();
            e.orderToken && n.resolve(e.orderToken);
            try {
                t(), e._modalTimer = setTimeout(function () {
                    e.orderDialog || e.startOrderModal()
                }, 1e3), e._tokenTimer = setInterval(function () {
                    e.orderDialog || e.startOrderModal(), t()
                }, 2e3)
            } catch (t) {
                e.closeOrderModal()
            }
            return n.promise()
        }, executeTokenException: function (t) {
            var e = this;
            switch (t) {
                case 401:
                    e.closeOrderModal(), o.login();
                    break;
                case 5002:
                    e.closeOrderModal(), r.trigger("QUEUE_SALE_STATUS")
            }
        }
    };
    t.exports = window._Queue = u
}, function (t, e, n) {/*! artDialog v6.0.5 | https://github.com/aui/artDialog */
    var i = n(29);
    !function () {
        function t(e) {
            var i = n[e], r = "exports";
            return "object" == typeof i ? i : (i[r] || (i[r] = {}, i[r] = i.call(i[r], t, i[r], i) || i[r]), i[r])
        }

        function e(t, e) {
            n[t] = e
        }

        var n = {};
        e("jquery", function () {
            return i
        }), /*!
	 * PopupJS
	 * Date: 2014-11-09
	 * https://github.com/aui/popupjs
	 * (c) 2009-2014 TangBin, http://www.planeArt.cn
	 *
	 * This is licensed under the GNU LGPL, version 2.1 or later.
	 * For details, see: http://www.gnu.org/licenses/lgpl-2.1.html
	 */
            e("popup", function (t) {
                function e() {
                    this.destroyed = !1, this.__popup = n("<div />").css({
                        display: "none",
                        position: "absolute",
                        outline: 0
                    }).attr("tabindex", "-1").html(this.innerHTML).appendTo("body"), this.__backdrop = this.__mask = n("<div />").css({
                        opacity: .7,
                        background: "#000"
                    }), this.node = this.__popup[0], this.backdrop = this.__backdrop[0], i++
                }

                var n = t("jquery"), i = 0, r = !("minWidth" in n("html")[0].style), o = !r;
                return n.extend(e.prototype, {
                    node: null,
                    backdrop: null,
                    fixed: !1,
                    destroyed: !0,
                    open: !1,
                    returnValue: "",
                    autofocus: !0,
                    align: "bottom left",
                    innerHTML: "",
                    className: "ui-popup",
                    show: function (t) {
                        if (this.destroyed) return this;
                        var i = this.__popup, s = this.__backdrop;
                        if (this.__activeElement = this.__getActive(), this.open = !0, this.follow = t || this.follow, !this.__ready) {
                            if (i.addClass(this.className).attr("role", this.modal ? "alertdialog" : "dialog").css("position", this.fixed ? "fixed" : "absolute"), r || n(window).on("resize", n.proxy(this.reset, this)), this.modal) {
                                var a = {
                                    position: "fixed",
                                    left: 0,
                                    top: 0,
                                    width: "100%",
                                    height: "100%",
                                    overflow: "hidden",
                                    userSelect: "none",
                                    zIndex: this.zIndex || e.zIndex
                                };
                                i.addClass(this.className + "-modal"), o || n.extend(a, {
                                    position: "absolute",
                                    width: n(window).width() + "px",
                                    height: n(document).height() + "px"
                                }), s.css(a).attr({tabindex: "0"}).on("focus", n.proxy(this.focus, this)), this.__mask = s.clone(!0).attr("style", "").insertAfter(i), s.addClass(this.className + "-backdrop").insertBefore(i), this.__ready = !0
                            }
                            i.html() || i.html(this.innerHTML)
                        }
                        return i.addClass(this.className + "-show").show(), s.show(), this.reset().focus(), this.__dispatchEvent("show"), this
                    },
                    showModal: function () {
                        return this.modal = !0, this.show.apply(this, arguments)
                    },
                    close: function (t) {
                        return !this.destroyed && this.open && (void 0 !== t && (this.returnValue = t), this.__popup.hide().removeClass(this.className + "-show"), this.__backdrop.hide(), this.open = !1, this.blur(), this.__dispatchEvent("close")), this
                    },
                    remove: function () {
                        if (this.destroyed) return this;
                        this.__dispatchEvent("beforeremove"), e.current === this && (e.current = null), this.__popup.remove(), this.__backdrop.remove(), this.__mask.remove(), r || n(window).off("resize", this.reset), this.__dispatchEvent("remove");
                        for (var t in this) delete this[t];
                        return this
                    },
                    reset: function () {
                        var t = this.follow;
                        return t ? this.__follow(t) : this.__center(), this.__dispatchEvent("reset"), this
                    },
                    focus: function () {
                        var t = this.node, i = this.__popup, r = e.current, o = this.zIndex = e.zIndex++;
                        if (r && r !== this && r.blur(!1), !n.contains(t, this.__getActive())) {
                            var s = i.find("[autofocus]")[0];
                            !this._autofocus && s ? this._autofocus = !0 : s = t, this.__focus(s)
                        }
                        return i.css("zIndex", o), e.current = this, i.addClass(this.className + "-focus"), this.__dispatchEvent("focus"), this
                    },
                    blur: function () {
                        var t = this.__activeElement, e = arguments[0];
                        return e !== !1 && this.__focus(t), this._autofocus = !1, this.__popup.removeClass(this.className + "-focus"), this.__dispatchEvent("blur"), this
                    },
                    addEventListener: function (t, e) {
                        return this.__getEventListener(t).push(e), this
                    },
                    removeEventListener: function (t, e) {
                        for (var n = this.__getEventListener(t), i = 0; i < n.length; i++) e === n[i] && n.splice(i--, 1);
                        return this
                    },
                    __getEventListener: function (t) {
                        var e = this.__listener;
                        return e || (e = this.__listener = {}), e[t] || (e[t] = []), e[t]
                    },
                    __dispatchEvent: function (t) {
                        var e = this.__getEventListener(t);
                        this["on" + t] && this["on" + t]();
                        for (var n = 0; n < e.length; n++) e[n].call(this)
                    },
                    __focus: function (t) {
                        try {
                            this.autofocus && !/^iframe$/i.test(t.nodeName) && t.focus()
                        } catch (t) {
                        }
                    },
                    __getActive: function () {
                        try {
                            var t = document.activeElement, e = t.contentDocument, n = e && e.activeElement || t;
                            return n
                        } catch (t) {
                        }
                    },
                    __center: function () {
                        var t = this.__popup, e = n(window), i = (n(document), this.fixed, 0), r = 0, o = e.width(),
                            s = e.height(), a = t.width(), c = t.height(), u = (o - a) / 2 + i,
                            l = 382 * (s - c) / 1e3 + r, h = t[0].style;
                        h.left = Math.max(parseInt(u), i) + "px", h.top = Math.max(parseInt(l), r) + "px"
                    },
                    __follow: function (t) {
                        var e = t.parentNode && n(t), i = this.__popup;
                        if (this.__followSkin && i.removeClass(this.__followSkin), e) {
                            var r = e.offset();
                            if (r.left * r.top < 0) return this.__center()
                        }
                        var o = this, s = this.fixed, a = n(window), c = n(document), u = a.width(), l = a.height(),
                            h = c.scrollLeft(), d = c.scrollTop(), p = i.width(), f = i.height(),
                            v = e ? e.outerWidth() : 0, m = e ? e.outerHeight() : 0, g = this.__offset(t), y = g.left,
                            b = g.top, w = s ? y - h : y, _ = s ? b - d : b, k = s ? 0 : h, x = s ? 0 : d,
                            T = k + u - p, S = x + l - f, E = {}, P = this.align.split(" "), C = this.className + "-",
                            I = {top: "bottom", bottom: "top", left: "right", right: "left"},
                            A = {top: "top", bottom: "top", left: "left", right: "left"},
                            M = [{top: _ - f, bottom: _ + m, left: w - p, right: w + v}, {
                                top: _,
                                bottom: _ - f + m,
                                left: w,
                                right: w - p + v
                            }], D = {left: w + v / 2 - p / 2, top: _ + m / 2 - f / 2}, N = {left: [k, T], top: [x, S]};
                        n.each(P, function (t, e) {
                            M[t][e] > N[A[e]][1] && (e = P[t] = I[e]), M[t][e] < N[A[e]][0] && (P[t] = I[e])
                        }), P[1] || (A[P[1]] = "left" === A[P[0]] ? "top" : "left", M[1][P[1]] = D[A[P[1]]]), C += P.join("-") + " " + this.className + "-follow", o.__followSkin = C, e && i.addClass(C), E[A[P[0]]] = parseInt(M[0][P[0]]), E[A[P[1]]] = parseInt(M[1][P[1]]), i.css(E)
                    },
                    __offset: function (t) {
                        var e = t.parentNode, i = e ? n(t).offset() : {left: t.pageX, top: t.pageY};
                        t = e ? t : t.target;
                        var r = t.ownerDocument, o = r.defaultView || r.parentWindow;
                        if (o == window) return i;
                        var s = o.frameElement, a = n(r), c = a.scrollLeft(), u = a.scrollTop(), l = n(s).offset(),
                            h = l.left, d = l.top;
                        return {left: i.left + h - c, top: i.top + d - u}
                    }
                }), e.zIndex = 1024, e.current = null, e
            }), e("dialog-config", {
            backdropBackground: "#000",
            backdropOpacity: .7,
            content: '<span class="ui-dialog-loading">Loading..</span>',
            title: "",
            statusbar: "",
            button: null,
            ok: null,
            cancel: null,
            okValue: "ok",
            cancelValue: "cancel",
            cancelDisplay: !0,
            width: "",
            height: "",
            padding: "",
            skin: "",
            quickClose: !1,
            cssUri: "../css/ui-dialog.css",
            innerHTML: '<div i="dialog" class="ui-dialog"><div class="ui-dialog-arrow-a"></div><div class="ui-dialog-arrow-b"></div><table class="ui-dialog-grid"><tr><td i="header" class="ui-dialog-header"><button i="close" class="ui-dialog-close">&#215;</button><div i="title" class="ui-dialog-title"></div></td></tr><tr><td i="body" class="ui-dialog-body"><div i="content" class="ui-dialog-content"></div></td></tr><tr><td i="footer" class="ui-dialog-footer"><div i="statusbar" class="ui-dialog-statusbar"></div><div i="button" class="ui-dialog-button"></div></td></tr></table></div>'
        }), /*!
	 * artDialog
	 * Date: 2014-11-09
	 * https://github.com/aui/artDialog
	 * (c) 2009-2014 TangBin, http://www.planeArt.cn
	 *
	 * This is licensed under the GNU LGPL, version 2.1 or later.
	 * For details, see: http://www.gnu.org/licenses/lgpl-2.1.html
	 */
            e("dialog", function (t) {
                var e = t("jquery"), n = t("popup"), i = t("dialog-config"), r = i.cssUri;
                if (r) {
                    var o = t[t.toUrl ? "toUrl" : "resolve"];
                    o && (r = o(r), r = '<link rel="stylesheet" href="' + r + '" />', e("base")[0] ? e("base").before(r) : e("head").append(r))
                }
                var s = 0, a = new Date - 0, c = !("minWidth" in e("html")[0].style),
                    u = "createTouch" in document && !("onmousemove" in document) || /(iPhone|iPad|iPod)/i.test(navigator.userAgent),
                    l = !c && !u, h = function (t, n, i) {
                        var r = t = t || {};
                        "string" != typeof t && 1 !== t.nodeType || (t = {
                            content: t,
                            fixed: !u
                        }), t = e.extend(!0, {}, h.defaults, t), t.original = r;
                        var o = t.id = t.id || a + s, c = h.get(o);
                        return c ? c.focus() : (l || (t.fixed = !1), t.quickClose && (t.modal = !0, t.backdropOpacity = 0), e.isArray(t.button) || (t.button = []), void 0 !== i && (t.cancel = i), t.cancel && t.button.push({
                            id: "cancel",
                            value: t.cancelValue,
                            callback: t.cancel,
                            display: t.cancelDisplay
                        }), void 0 !== n && (t.ok = n), t.ok && t.button.push({
                            id: "ok",
                            value: t.okValue,
                            callback: t.ok,
                            autofocus: !0
                        }), h.list[o] = new h.create(t))
                    }, d = function () {
                    };
                d.prototype = n.prototype;
                var p = h.prototype = new d;
                return h.create = function (t) {
                    var i = this;
                    e.extend(this, new n);
                    var r = (t.original, e(this.node).html(t.innerHTML)), o = e(this.backdrop);
                    return this.options = t, this._popup = r, e.each(t, function (t, e) {
                        "function" == typeof i[t] ? i[t](e) : i[t] = e
                    }), t.zIndex && (n.zIndex = t.zIndex), r.attr({
                        "aria-labelledby": this._$("title").attr("id", "title:" + this.id).attr("id"),
                        "aria-describedby": this._$("content").attr("id", "content:" + this.id).attr("id")
                    }), this._$("close").css("display", this.cancel === !1 ? "none" : "").attr("title", this.cancelValue).on("click", function (t) {
                        i._trigger("cancel"), t.preventDefault()
                    }), this._$("dialog").addClass(this.skin), this._$("body").css("padding", this.padding), t.quickClose && o.on("onmousedown" in document ? "mousedown" : "click", function () {
                        return i._trigger("cancel"), !1
                    }), this.addEventListener("show", function () {
                        o.css({opacity: 0, background: t.backdropBackground}).animate({opacity: t.backdropOpacity}, 150)
                    }), this._esc = function (t) {
                        var e = t.target, r = e.nodeName, o = /^input|textarea$/i, s = n.current === i, a = t.keyCode;
                        !s || o.test(r) && "button" !== e.type || 27 === a && i._trigger("cancel")
                    }, e(document).on("keydown", this._esc), this.addEventListener("remove", function () {
                        e(document).off("keydown", this._esc), delete h.list[this.id]
                    }), s++, this
                }, h.create.prototype = p, e.extend(p, {
                    content: function (t) {
                        var n = this._$("content");
                        return "object" == typeof t ? (t = e(t), n.empty("").append(t.show()), this.addEventListener("beforeremove", function () {
                            e("body").append(t.hide())
                        })) : n.html(t), this.reset()
                    }, title: function (t) {
                        return this._$("title").text(t), this._$("header")[t ? "show" : "hide"](), this
                    }, width: function (t) {
                        return this._$("content").css("width", t), this.reset()
                    }, height: function (t) {
                        return this._$("content").css("height", t), this.reset()
                    }, button: function (t) {
                        t = t || [];
                        var n = this, i = "", r = 0;
                        return this.callbacks = {}, "string" == typeof t ? (i = t, r++) : e.each(t, function (t, o) {
                            var s = o.id = o.id || o.value, a = "";
                            n.callbacks[s] = o.callback, o.display === !1 ? a = ' style="display:none"' : r++, i += '<button type="button" i-id="' + s + '"' + a + (o.disabled ? " disabled" : "") + (o.autofocus ? ' autofocus class="ui-dialog-autofocus"' : "") + ">" + o.value + "</button>", n._$("button").on("click", "[i-id=" + s + "]", function (t) {
                                var i = e(this);
                                i.attr("disabled") || n._trigger(s), t.preventDefault()
                            })
                        }), this._$("button").html(i), this._$("footer")[r ? "show" : "hide"](), this
                    }, statusbar: function (t) {
                        return this._$("statusbar").html(t)[t ? "show" : "hide"](), this
                    }, _$: function (t) {
                        return this._popup.find("[i=" + t + "]")
                    }, _trigger: function (t) {
                        var e = this.callbacks[t];
                        return "function" != typeof e || e.call(this) !== !1 ? this.close().remove() : this
                    }
                }), h.oncreate = e.noop, h.getCurrent = function () {
                    return n.current
                }, h.get = function (t) {
                    return void 0 === t ? h.list : h.list[t]
                }, h.list = {}, h.defaults = i, h
            }), window.dialog = t("dialog")
    }()
}, function (module, exports) {
    module.exports = function (obj) {
        var __t, __p = "", __j = Array.prototype.join, print = function () {
            __p += __j.call(arguments, "")
        };
        with (obj || {}) {
            __p += '<ul>\n    <li class="sku-item clearfix">\n        <figure class="package-item-pic">\n            <img src="' + (null == (__t = skuData.images[0] + "@240x240.jpg") ? "" : __t) + '" alt="' + (null == (__t = skuData.itemName) ? "" : __t) + '"/>\n        </figure>\n        <div class="package-item-info">\n            <div class="mod-tit">\n                <h3 class="vm-title ellipsis">' + (null == (__t = skuData.itemName) ? "" : __t) + "</h3>\n                <span>\n                    <small>¥</small>\n                    <em>" + (null == (__t = (skuData.mainPriceCent / 100).toFixed(2)) ? "" : __t) + '</em>\n                </span>\n            </div>\n            <div class="mod-prop">\n                <p>\n                    <a class="vm-text">\n                        <span>' + (null == (__t = skuData.attributes) ? "" : __t) + "</span>\n                    </a>\n                </p>\n                <em>    \n                    ×" + (null == (__t = quantity) ? "" : __t) + "\n                </em>\n            </div>\n        </div>\n    </li>\n    ";
            for (var i = 0, length = items.length; i < length; i++) {
                __p += '\n    <li class="package-item clearfix">\n        <figure class="package-item-pic">\n            <img src="' + (null == (__t = items[i].cells[items[i].recommend].images + "@240x240.jpg") ? "" : __t) + '"  alt="' + (null == (__t = items[i].cells[items[i].recommend].names) ? "" : __t) + '"/>\n        </figure>\n        <div class="package-item-info">\n            <div class="mod-tit">\n                <h3 class="vm-title ellipsis">' + (null == (__t = items[i].name) ? "" : __t) + "</h3>\n                <span>\n                    <small>¥</small>\n                    " + (null == (__t = (items[i].cells[items[i].recommend].priceCent / 100).toFixed(2)) ? "" : __t) + '\n                </span>\n            </div>\n            <div class="mod-prop">\n                    ';
                for (var p in items[i].saleAttrs) {
                    __p += "\n                    <p>\n                        ";
                    for (var j = 0, length2 = items[i].saleAttrs[p].length; j < length2; j++) __p += '\n                                <a class="vm-img ', items[i].recommend === p + ":" + items[i].saleAttrs[p][j].id && (__p += "selected"), __p += '" href="javascript:;" data-sku="' + (null == (__t = items[i].cells[p + ":" + items[i].saleAttrs[p][j].id].skuId) ? "" : __t) + '" data-sid="' + (null == (__t = items[i].id) ? "" : __t) + '" data-key="' + (null == (__t = p + ":" + items[i].saleAttrs[p][j].id) ? "" : __t) + '" title="' + (null == (__t = items[i].saleAttrs[p][j].name) ? "" : __t) + '">\n                                    <span>' + (null == (__t = items[i].saleAttrs[p][j].name) ? "" : __t) + "</span>\n                               </a>\n                        ";
                    __p += "\n                    </p>\n                    "
                }
                __p += "\n                <em>\n                    ×" + (null == (__t = quantity) ? "" : __t) + "\n                </em>\n            </div>\n        </div>\n    </li>\n    "
            }
            __p += "\n</ul>"
        }
        return __p
    }
}, function (t, e, n) {/*!
	 * cart.js
	 * @date 2017.4.11
	 * @author chenjinghui@meizu.com
	 * @version 0.0.1
	 */
    var i = n(29), r = n(62), o = n(45), s = (window.MZ.modelData, {add: "//cart.mall.meizu.com/add"}), a = {
        btnAddCart: i("#J_btnAddCart"),
        btnAddCartProps: i("#J_btnAddCartProps"),
        btnBuyPropsEnter: i("#J_btnBuyPropsEnter")
    }, c = function (t) {
        var e = this;
        e.liveView = t, e.model = t.model, t.listenTo(e.model, "change:skuId", t.syncShow), t.syncShow(), e.bindEvent()
    };
    c.prototype.bindEvent = function () {
        var t = this, e = t.liveView;
        a.btnAddCart.add(a.btnAddCartProps).on("tap", function (n) {
            n.preventDefault();
            var i = t.model.toJSON(), r = {
                skuId: i.skuId,
                quantity: i.quantity,
                packageId: i.activePackage,
                packageSkuIds: i.packageSkuIds ? i.packageSkuIds.join(",") : ""
            };
            return e.propEnsure ? (o.ajax(s.add, r).done(function (e, n) {
                t.addCartSuccess(e, n)
            }).fail(function (e, n) {
                t.addCartrror(e, n)
            }), n.preventDefault(), void n.stopPropagation()) : void e.openProps("cart")
        })
    }, c.prototype.addCartSuccess = function (t, e) {
        var n = "success", i = "";
        e.data.reachHalf && (n = "confirm", i = "提示：您购物车中的商品已满50种，当购物车超出上限时，您最早加入的商品将会被清除，建议您先去结算哦~"), new r({
            id: "alertCart",
            type: n,
            tips: i,
            message: "已成功加入购物车"
        })
    }, c.prototype.addCartrror = function (t, e) {
        var n = {type: "", message: "", tips: ""};
        if (e) switch (e.code) {
            case 1003:
                n.type = "warning", n.message = "购物车已满，请先结算或整理";
                break;
            case 1007:
                n.type = "warning", n.message = "来晚了！已经没货了~";
                break;
            default:
                n.type = "error", n.message = t
        } else n.type = "error", n.message = "加入失败";
        n.id = "alertCart", new r(n), !e || 1006 !== e.code && 1007 !== e.code || setTimeout(function () {
            location.reload()
        }, 2e3)
    }, t.exports = window._Cart = c
}, function (t, e, n) {
    var i = n(29), r = (n(63), n(64)), o = {
        type: "success",
        message: "",
        tips: "",
        addLink: "",
        addLinkText: "",
        onshow: i.noop,
        delay: 3e3,
        width: "auto",
        id: ""
    }, s = function (t) {
        this.opts = i.extend({}, o, t), "number" == typeof this.opts.width && (this.opts.width = this.opts.width + "px"), "confirm" === t.type && (this.opts.width = "81%"), this.tmplCompiled = r, this.render(), this.show(), this.bindEvent()
    };
    s.prototype.render = function (t) {
        var e = this, t = this.opts, n = this.tmplCompiled(t), r = i("body");
        e.$node = i('<div class="alert" style="display:none;"></div'), t.id && (i("#" + t.id).length && i("#" + t.id).remove(), e.$node.attr("id", t.id)), e.$node.css({
            position: "fixed",
            top: 0,
            right: 0,
            bottom: 0,
            left: 0
        }), e.$node.append(n).appendTo(r)
    }, s.prototype.bindEvent = function () {
        var t = this;
        t.opts;
        t.$node.on("click", ".bi-backdrop,.bi-alert-close", function () {
            t.remove()
        }), t.$node[0].addEventListener("touchmove", function (t) {
            t.preventDefault()
        }, !1)
    }, s.prototype.show = function () {
        var t = this, e = t.opts;
        t.$node.show(), "confirm" !== e.type && setTimeout(function () {
            t.$node.remove()
        }, e.delay)
    }, s.prototype.remove = function () {
        this.$node.remove()
    }, t.exports = window._Alert = s
}, function (t, e, n) {
    var i, r;
    (function () {
        function n(t) {
            function e(e, n, i, r, o, s) {
                for (; o >= 0 && o < s; o += t) {
                    var a = r ? r[o] : o;
                    i = n(i, e[a], a, e)
                }
                return i
            }

            return function (n, i, r, o) {
                i = x(i, o, 4);
                var s = !A(n) && k.keys(n), a = (s || n).length, c = t > 0 ? 0 : a - 1;
                return arguments.length < 3 && (r = n[s ? s[c] : c], c += t), e(n, i, r, s, c, a)
            }
        }

        function o(t) {
            return function (e, n, i) {
                n = T(n, i);
                for (var r = I(e), o = t > 0 ? 0 : r - 1; o >= 0 && o < r; o += t) if (n(e[o], o, e)) return o;
                return -1
            }
        }

        function s(t, e, n) {
            return function (i, r, o) {
                var s = 0, a = I(i);
                if ("number" == typeof o) t > 0 ? s = o >= 0 ? o : Math.max(o + a, s) : a = o >= 0 ? Math.min(o + 1, a) : o + a + 1; else if (n && o && a) return o = n(i, r), i[o] === r ? o : -1;
                if (r !== r) return o = e(f.call(i, s, a), k.isNaN), o >= 0 ? o + s : -1;
                for (o = t > 0 ? s : a - 1; o >= 0 && o < a; o += t) if (i[o] === r) return o;
                return -1
            }
        }

        function a(t, e) {
            var n = j.length, i = t.constructor, r = k.isFunction(i) && i.prototype || h, o = "constructor";
            for (k.has(t, o) && !k.contains(e, o) && e.push(o); n--;) o = j[n], o in t && t[o] !== r[o] && !k.contains(e, o) && e.push(o)
        }

        var c = this, u = c._, l = Array.prototype, h = Object.prototype, d = Function.prototype, p = l.push,
            f = l.slice, v = h.toString, m = h.hasOwnProperty, g = Array.isArray, y = Object.keys, b = d.bind,
            w = Object.create, _ = function () {
            }, k = function (t) {
                return t instanceof k ? t : this instanceof k ? void(this._wrapped = t) : new k(t)
            };
        "undefined" != typeof t && t.exports && (e = t.exports = k), e._ = k, k.VERSION = "1.8.3";
        var x = function (t, e, n) {
            if (void 0 === e) return t;
            switch (null == n ? 3 : n) {
                case 1:
                    return function (n) {
                        return t.call(e, n)
                    };
                case 2:
                    return function (n, i) {
                        return t.call(e, n, i)
                    };
                case 3:
                    return function (n, i, r) {
                        return t.call(e, n, i, r)
                    };
                case 4:
                    return function (n, i, r, o) {
                        return t.call(e, n, i, r, o)
                    }
            }
            return function () {
                return t.apply(e, arguments)
            }
        }, T = function (t, e, n) {
            return null == t ? k.identity : k.isFunction(t) ? x(t, e, n) : k.isObject(t) ? k.matcher(t) : k.property(t)
        };
        k.iteratee = function (t, e) {
            return T(t, e, 1 / 0)
        };
        var S = function (t, e) {
            return function (n) {
                var i = arguments.length;
                if (i < 2 || null == n) return n;
                for (var r = 1; r < i; r++) for (var o = arguments[r], s = t(o), a = s.length, c = 0; c < a; c++) {
                    var u = s[c];
                    e && void 0 !== n[u] || (n[u] = o[u])
                }
                return n
            }
        }, E = function (t) {
            if (!k.isObject(t)) return {};
            if (w) return w(t);
            _.prototype = t;
            var e = new _;
            return _.prototype = null, e
        }, P = function (t) {
            return function (e) {
                return null == e ? void 0 : e[t]
            }
        }, C = Math.pow(2, 53) - 1, I = P("length"), A = function (t) {
            var e = I(t);
            return "number" == typeof e && e >= 0 && e <= C
        };
        k.each = k.forEach = function (t, e, n) {
            e = x(e, n);
            var i, r;
            if (A(t)) for (i = 0, r = t.length; i < r; i++) e(t[i], i, t); else {
                var o = k.keys(t);
                for (i = 0, r = o.length; i < r; i++) e(t[o[i]], o[i], t)
            }
            return t
        }, k.map = k.collect = function (t, e, n) {
            e = T(e, n);
            for (var i = !A(t) && k.keys(t), r = (i || t).length, o = Array(r), s = 0; s < r; s++) {
                var a = i ? i[s] : s;
                o[s] = e(t[a], a, t)
            }
            return o
        }, k.reduce = k.foldl = k.inject = n(1), k.reduceRight = k.foldr = n(-1), k.find = k.detect = function (t, e, n) {
            var i;
            if (i = A(t) ? k.findIndex(t, e, n) : k.findKey(t, e, n), void 0 !== i && i !== -1) return t[i]
        }, k.filter = k.select = function (t, e, n) {
            var i = [];
            return e = T(e, n), k.each(t, function (t, n, r) {
                e(t, n, r) && i.push(t)
            }), i
        }, k.reject = function (t, e, n) {
            return k.filter(t, k.negate(T(e)), n)
        }, k.every = k.all = function (t, e, n) {
            e = T(e, n);
            for (var i = !A(t) && k.keys(t), r = (i || t).length, o = 0; o < r; o++) {
                var s = i ? i[o] : o;
                if (!e(t[s], s, t)) return !1
            }
            return !0
        }, k.some = k.any = function (t, e, n) {
            e = T(e, n);
            for (var i = !A(t) && k.keys(t), r = (i || t).length, o = 0; o < r; o++) {
                var s = i ? i[o] : o;
                if (e(t[s], s, t)) return !0
            }
            return !1
        }, k.contains = k.includes = k.include = function (t, e, n, i) {
            return A(t) || (t = k.values(t)), ("number" != typeof n || i) && (n = 0), k.indexOf(t, e, n) >= 0
        }, k.invoke = function (t, e) {
            var n = f.call(arguments, 2), i = k.isFunction(e);
            return k.map(t, function (t) {
                var r = i ? e : t[e];
                return null == r ? r : r.apply(t, n)
            })
        }, k.pluck = function (t, e) {
            return k.map(t, k.property(e))
        }, k.where = function (t, e) {
            return k.filter(t, k.matcher(e))
        }, k.findWhere = function (t, e) {
            return k.find(t, k.matcher(e))
        }, k.max = function (t, e, n) {
            var i, r, o = -(1 / 0), s = -(1 / 0);
            if (null == e && null != t) {
                t = A(t) ? t : k.values(t);
                for (var a = 0, c = t.length; a < c; a++) i = t[a], i > o && (o = i)
            } else e = T(e, n), k.each(t, function (t, n, i) {
                r = e(t, n, i), (r > s || r === -(1 / 0) && o === -(1 / 0)) && (o = t, s = r)
            });
            return o
        }, k.min = function (t, e, n) {
            var i, r, o = 1 / 0, s = 1 / 0;
            if (null == e && null != t) {
                t = A(t) ? t : k.values(t);
                for (var a = 0, c = t.length; a < c; a++) i = t[a], i < o && (o = i)
            } else e = T(e, n), k.each(t, function (t, n, i) {
                r = e(t, n, i), (r < s || r === 1 / 0 && o === 1 / 0) && (o = t, s = r)
            });
            return o
        }, k.shuffle = function (t) {
            for (var e, n = A(t) ? t : k.values(t), i = n.length, r = Array(i), o = 0; o < i; o++) e = k.random(0, o), e !== o && (r[o] = r[e]), r[e] = n[o];
            return r
        }, k.sample = function (t, e, n) {
            return null == e || n ? (A(t) || (t = k.values(t)), t[k.random(t.length - 1)]) : k.shuffle(t).slice(0, Math.max(0, e))
        }, k.sortBy = function (t, e, n) {
            return e = T(e, n), k.pluck(k.map(t, function (t, n, i) {
                return {value: t, index: n, criteria: e(t, n, i)}
            }).sort(function (t, e) {
                var n = t.criteria, i = e.criteria;
                if (n !== i) {
                    if (n > i || void 0 === n) return 1;
                    if (n < i || void 0 === i) return -1
                }
                return t.index - e.index
            }), "value")
        };
        var M = function (t) {
            return function (e, n, i) {
                var r = {};
                return n = T(n, i), k.each(e, function (i, o) {
                    var s = n(i, o, e);
                    t(r, i, s)
                }), r
            }
        };
        k.groupBy = M(function (t, e, n) {
            k.has(t, n) ? t[n].push(e) : t[n] = [e]
        }), k.indexBy = M(function (t, e, n) {
            t[n] = e
        }), k.countBy = M(function (t, e, n) {
            k.has(t, n) ? t[n]++ : t[n] = 1
        }), k.toArray = function (t) {
            return t ? k.isArray(t) ? f.call(t) : A(t) ? k.map(t, k.identity) : k.values(t) : []
        }, k.size = function (t) {
            return null == t ? 0 : A(t) ? t.length : k.keys(t).length
        }, k.partition = function (t, e, n) {
            e = T(e, n);
            var i = [], r = [];
            return k.each(t, function (t, n, o) {
                (e(t, n, o) ? i : r).push(t)
            }), [i, r]
        }, k.first = k.head = k.take = function (t, e, n) {
            if (null != t) return null == e || n ? t[0] : k.initial(t, t.length - e)
        }, k.initial = function (t, e, n) {
            return f.call(t, 0, Math.max(0, t.length - (null == e || n ? 1 : e)))
        }, k.last = function (t, e, n) {
            if (null != t) return null == e || n ? t[t.length - 1] : k.rest(t, Math.max(0, t.length - e))
        }, k.rest = k.tail = k.drop = function (t, e, n) {
            return f.call(t, null == e || n ? 1 : e)
        }, k.compact = function (t) {
            return k.filter(t, k.identity)
        };
        var D = function (t, e, n, i) {
            for (var r = [], o = 0, s = i || 0, a = I(t); s < a; s++) {
                var c = t[s];
                if (A(c) && (k.isArray(c) || k.isArguments(c))) {
                    e || (c = D(c, e, n));
                    var u = 0, l = c.length;
                    for (r.length += l; u < l;) r[o++] = c[u++]
                } else n || (r[o++] = c)
            }
            return r
        };
        k.flatten = function (t, e) {
            return D(t, e, !1)
        }, k.without = function (t) {
            return k.difference(t, f.call(arguments, 1))
        }, k.uniq = k.unique = function (t, e, n, i) {
            k.isBoolean(e) || (i = n, n = e, e = !1), null != n && (n = T(n, i));
            for (var r = [], o = [], s = 0, a = I(t); s < a; s++) {
                var c = t[s], u = n ? n(c, s, t) : c;
                e ? (s && o === u || r.push(c), o = u) : n ? k.contains(o, u) || (o.push(u), r.push(c)) : k.contains(r, c) || r.push(c)
            }
            return r
        }, k.union = function () {
            return k.uniq(D(arguments, !0, !0))
        }, k.intersection = function (t) {
            for (var e = [], n = arguments.length, i = 0, r = I(t); i < r; i++) {
                var o = t[i];
                if (!k.contains(e, o)) {
                    for (var s = 1; s < n && k.contains(arguments[s], o); s++) ;
                    s === n && e.push(o)
                }
            }
            return e
        }, k.difference = function (t) {
            var e = D(arguments, !0, !0, 1);
            return k.filter(t, function (t) {
                return !k.contains(e, t)
            })
        }, k.zip = function () {
            return k.unzip(arguments)
        }, k.unzip = function (t) {
            for (var e = t && k.max(t, I).length || 0, n = Array(e), i = 0; i < e; i++) n[i] = k.pluck(t, i);
            return n
        }, k.object = function (t, e) {
            for (var n = {}, i = 0, r = I(t); i < r; i++) e ? n[t[i]] = e[i] : n[t[i][0]] = t[i][1];
            return n
        }, k.findIndex = o(1), k.findLastIndex = o(-1), k.sortedIndex = function (t, e, n, i) {
            n = T(n, i, 1);
            for (var r = n(e), o = 0, s = I(t); o < s;) {
                var a = Math.floor((o + s) / 2);
                n(t[a]) < r ? o = a + 1 : s = a
            }
            return o
        }, k.indexOf = s(1, k.findIndex, k.sortedIndex), k.lastIndexOf = s(-1, k.findLastIndex), k.range = function (t, e, n) {
            null == e && (e = t || 0, t = 0), n = n || 1;
            for (var i = Math.max(Math.ceil((e - t) / n), 0), r = Array(i), o = 0; o < i; o++, t += n) r[o] = t;
            return r
        };
        var N = function (t, e, n, i, r) {
            if (!(i instanceof e)) return t.apply(n, r);
            var o = E(t.prototype), s = t.apply(o, r);
            return k.isObject(s) ? s : o
        };
        k.bind = function (t, e) {
            if (b && t.bind === b) return b.apply(t, f.call(arguments, 1));
            if (!k.isFunction(t)) throw new TypeError("Bind must be called on a function");
            var n = f.call(arguments, 2), i = function () {
                return N(t, i, e, this, n.concat(f.call(arguments)))
            };
            return i
        }, k.partial = function (t) {
            var e = f.call(arguments, 1), n = function () {
                for (var i = 0, r = e.length, o = Array(r), s = 0; s < r; s++) o[s] = e[s] === k ? arguments[i++] : e[s];
                for (; i < arguments.length;) o.push(arguments[i++]);
                return N(t, n, this, this, o)
            };
            return n
        }, k.bindAll = function (t) {
            var e, n, i = arguments.length;
            if (i <= 1) throw new Error("bindAll must be passed function names");
            for (e = 1; e < i; e++) n = arguments[e], t[n] = k.bind(t[n], t);
            return t
        }, k.memoize = function (t, e) {
            var n = function (i) {
                var r = n.cache, o = "" + (e ? e.apply(this, arguments) : i);
                return k.has(r, o) || (r[o] = t.apply(this, arguments)), r[o]
            };
            return n.cache = {}, n
        }, k.delay = function (t, e) {
            var n = f.call(arguments, 2);
            return setTimeout(function () {
                return t.apply(null, n)
            }, e)
        }, k.defer = k.partial(k.delay, k, 1), k.throttle = function (t, e, n) {
            var i, r, o, s = null, a = 0;
            n || (n = {});
            var c = function () {
                a = n.leading === !1 ? 0 : k.now(), s = null, o = t.apply(i, r), s || (i = r = null)
            };
            return function () {
                var u = k.now();
                a || n.leading !== !1 || (a = u);
                var l = e - (u - a);
                return i = this, r = arguments, l <= 0 || l > e ? (s && (clearTimeout(s), s = null), a = u, o = t.apply(i, r), s || (i = r = null)) : s || n.trailing === !1 || (s = setTimeout(c, l)), o
            }
        }, k.debounce = function (t, e, n) {
            var i, r, o, s, a, c = function () {
                var u = k.now() - s;
                u < e && u >= 0 ? i = setTimeout(c, e - u) : (i = null, n || (a = t.apply(o, r), i || (o = r = null)))
            };
            return function () {
                o = this, r = arguments, s = k.now();
                var u = n && !i;
                return i || (i = setTimeout(c, e)), u && (a = t.apply(o, r), o = r = null), a
            }
        }, k.wrap = function (t, e) {
            return k.partial(e, t)
        }, k.negate = function (t) {
            return function () {
                return !t.apply(this, arguments)
            }
        }, k.compose = function () {
            var t = arguments, e = t.length - 1;
            return function () {
                for (var n = e, i = t[e].apply(this, arguments); n--;) i = t[n].call(this, i);
                return i
            }
        }, k.after = function (t, e) {
            return function () {
                if (--t < 1) return e.apply(this, arguments)
            }
        }, k.before = function (t, e) {
            var n;
            return function () {
                return --t > 0 && (n = e.apply(this, arguments)), t <= 1 && (e = null), n
            }
        }, k.once = k.partial(k.before, 2);
        var O = !{toString: null}.propertyIsEnumerable("toString"),
            j = ["valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"];
        k.keys = function (t) {
            if (!k.isObject(t)) return [];
            if (y) return y(t);
            var e = [];
            for (var n in t) k.has(t, n) && e.push(n);
            return O && a(t, e), e
        }, k.allKeys = function (t) {
            if (!k.isObject(t)) return [];
            var e = [];
            for (var n in t) e.push(n);
            return O && a(t, e), e
        }, k.values = function (t) {
            for (var e = k.keys(t), n = e.length, i = Array(n), r = 0; r < n; r++) i[r] = t[e[r]];
            return i
        }, k.mapObject = function (t, e, n) {
            e = T(e, n);
            for (var i, r = k.keys(t), o = r.length, s = {}, a = 0; a < o; a++) i = r[a], s[i] = e(t[i], i, t);
            return s
        }, k.pairs = function (t) {
            for (var e = k.keys(t), n = e.length, i = Array(n), r = 0; r < n; r++) i[r] = [e[r], t[e[r]]];
            return i
        }, k.invert = function (t) {
            for (var e = {}, n = k.keys(t), i = 0, r = n.length; i < r; i++) e[t[n[i]]] = n[i];
            return e
        }, k.functions = k.methods = function (t) {
            var e = [];
            for (var n in t) k.isFunction(t[n]) && e.push(n);
            return e.sort()
        }, k.extend = S(k.allKeys), k.extendOwn = k.assign = S(k.keys), k.findKey = function (t, e, n) {
            e = T(e, n);
            for (var i, r = k.keys(t), o = 0, s = r.length; o < s; o++) if (i = r[o], e(t[i], i, t)) return i
        }, k.pick = function (t, e, n) {
            var i, r, o = {}, s = t;
            if (null == s) return o;
            k.isFunction(e) ? (r = k.allKeys(s), i = x(e, n)) : (r = D(arguments, !1, !1, 1), i = function (t, e, n) {
                return e in n
            }, s = Object(s));
            for (var a = 0, c = r.length; a < c; a++) {
                var u = r[a], l = s[u];
                i(l, u, s) && (o[u] = l)
            }
            return o
        }, k.omit = function (t, e, n) {
            if (k.isFunction(e)) e = k.negate(e); else {
                var i = k.map(D(arguments, !1, !1, 1), String);
                e = function (t, e) {
                    return !k.contains(i, e)
                }
            }
            return k.pick(t, e, n)
        }, k.defaults = S(k.allKeys, !0), k.create = function (t, e) {
            var n = E(t);
            return e && k.extendOwn(n, e), n
        }, k.clone = function (t) {
            return k.isObject(t) ? k.isArray(t) ? t.slice() : k.extend({}, t) : t
        }, k.tap = function (t, e) {
            return e(t), t
        }, k.isMatch = function (t, e) {
            var n = k.keys(e), i = n.length;
            if (null == t) return !i;
            for (var r = Object(t), o = 0; o < i; o++) {
                var s = n[o];
                if (e[s] !== r[s] || !(s in r)) return !1
            }
            return !0
        };
        var L = function (t, e, n, i) {
            if (t === e) return 0 !== t || 1 / t === 1 / e;
            if (null == t || null == e) return t === e;
            t instanceof k && (t = t._wrapped), e instanceof k && (e = e._wrapped);
            var r = v.call(t);
            if (r !== v.call(e)) return !1;
            switch (r) {
                case"[object RegExp]":
                case"[object String]":
                    return "" + t == "" + e;
                case"[object Number]":
                    return +t !== +t ? +e !== +e : 0 === +t ? 1 / +t === 1 / e : +t === +e;
                case"[object Date]":
                case"[object Boolean]":
                    return +t === +e
            }
            var o = "[object Array]" === r;
            if (!o) {
                if ("object" != typeof t || "object" != typeof e) return !1;
                var s = t.constructor, a = e.constructor;
                if (s !== a && !(k.isFunction(s) && s instanceof s && k.isFunction(a) && a instanceof a) && "constructor" in t && "constructor" in e) return !1
            }
            n = n || [], i = i || [];
            for (var c = n.length; c--;) if (n[c] === t) return i[c] === e;
            if (n.push(t), i.push(e), o) {
                if (c = t.length, c !== e.length) return !1;
                for (; c--;) if (!L(t[c], e[c], n, i)) return !1
            } else {
                var u, l = k.keys(t);
                if (c = l.length, k.keys(e).length !== c) return !1;
                for (; c--;) if (u = l[c], !k.has(e, u) || !L(t[u], e[u], n, i)) return !1
            }
            return n.pop(), i.pop(), !0
        };
        k.isEqual = function (t, e) {
            return L(t, e)
        }, k.isEmpty = function (t) {
            return null == t || (A(t) && (k.isArray(t) || k.isString(t) || k.isArguments(t)) ? 0 === t.length : 0 === k.keys(t).length)
        }, k.isElement = function (t) {
            return !(!t || 1 !== t.nodeType)
        }, k.isArray = g || function (t) {
            return "[object Array]" === v.call(t)
        }, k.isObject = function (t) {
            var e = typeof t;
            return "function" === e || "object" === e && !!t
        }, k.each(["Arguments", "Function", "String", "Number", "Date", "RegExp", "Error"], function (t) {
            k["is" + t] = function (e) {
                return v.call(e) === "[object " + t + "]"
            }
        }), k.isArguments(arguments) || (k.isArguments = function (t) {
            return k.has(t, "callee")
        }), "function" != typeof/./ && "object" != typeof Int8Array && (k.isFunction = function (t) {
            return "function" == typeof t || !1
        }), k.isFinite = function (t) {
            return isFinite(t) && !isNaN(parseFloat(t))
        }, k.isNaN = function (t) {
            return k.isNumber(t) && t !== +t
        }, k.isBoolean = function (t) {
            return t === !0 || t === !1 || "[object Boolean]" === v.call(t)
        }, k.isNull = function (t) {
            return null === t
        }, k.isUndefined = function (t) {
            return void 0 === t
        }, k.has = function (t, e) {
            return null != t && m.call(t, e)
        }, k.noConflict = function () {
            return c._ = u, this
        }, k.identity = function (t) {
            return t
        }, k.constant = function (t) {
            return function () {
                return t
            }
        }, k.noop = function () {
        }, k.property = P, k.propertyOf = function (t) {
            return null == t ? function () {
            } : function (e) {
                return t[e]
            }
        }, k.matcher = k.matches = function (t) {
            return t = k.extendOwn({}, t), function (e) {
                return k.isMatch(e, t)
            }
        }, k.times = function (t, e, n) {
            var i = Array(Math.max(0, t));
            e = x(e, n, 1);
            for (var r = 0; r < t; r++) i[r] = e(r);
            return i
        }, k.random = function (t, e) {
            return null == e && (e = t, t = 0), t + Math.floor(Math.random() * (e - t + 1))
        }, k.now = Date.now || function () {
            return (new Date).getTime()
        };
        var z = {"&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#x27;", "`": "&#x60;"}, B = k.invert(z),
            q = function (t) {
                var e = function (e) {
                    return t[e]
                }, n = "(?:" + k.keys(t).join("|") + ")", i = RegExp(n), r = RegExp(n, "g");
                return function (t) {
                    return t = null == t ? "" : "" + t, i.test(t) ? t.replace(r, e) : t
                }
            };
        k.escape = q(z), k.unescape = q(B), k.result = function (t, e, n) {
            var i = null == t ? void 0 : t[e];
            return void 0 === i && (i = n), k.isFunction(i) ? i.call(t) : i
        };
        var R = 0;
        k.uniqueId = function (t) {
            var e = ++R + "";
            return t ? t + e : e
        }, k.templateSettings = {
            evaluate: /<%([\s\S]+?)%>/g,
            interpolate: /<%=([\s\S]+?)%>/g,
            escape: /<%-([\s\S]+?)%>/g
        };
        var F = /(.)^/, H = {"'": "'", "\\": "\\", "\r": "r", "\n": "n", "\u2028": "u2028", "\u2029": "u2029"},
            X = /\\|'|\r|\n|\u2028|\u2029/g, Y = function (t) {
                return "\\" + H[t]
            };
        k.template = function (t, e, n) {
            !e && n && (e = n), e = k.defaults({}, e, k.templateSettings);
            var i = RegExp([(e.escape || F).source, (e.interpolate || F).source, (e.evaluate || F).source].join("|") + "|$", "g"),
                r = 0, o = "__p+='";
            t.replace(i, function (e, n, i, s, a) {
                return o += t.slice(r, a).replace(X, Y), r = a + e.length, n ? o += "'+\n((__t=(" + n + "))==null?'':_.escape(__t))+\n'" : i ? o += "'+\n((__t=(" + i + "))==null?'':__t)+\n'" : s && (o += "';\n" + s + "\n__p+='"), e
            }), o += "';\n", e.variable || (o = "with(obj||{}){\n" + o + "}\n"), o = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + o + "return __p;\n";
            try {
                var s = new Function(e.variable || "obj", "_", o)
            } catch (t) {
                throw t.source = o, t
            }
            var a = function (t) {
                return s.call(this, t, k)
            }, c = e.variable || "obj";
            return a.source = "function(" + c + "){\n" + o + "}", a
        }, k.chain = function (t) {
            var e = k(t);
            return e._chain = !0, e
        };
        var $ = function (t, e) {
            return t._chain ? k(e).chain() : e
        };
        k.mixin = function (t) {
            k.each(k.functions(t), function (e) {
                var n = k[e] = t[e];
                k.prototype[e] = function () {
                    var t = [this._wrapped];
                    return p.apply(t, arguments), $(this, n.apply(k, t))
                }
            })
        }, k.mixin(k), k.each(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function (t) {
            var e = l[t];
            k.prototype[t] = function () {
                var n = this._wrapped;
                return e.apply(n, arguments), "shift" !== t && "splice" !== t || 0 !== n.length || delete n[0], $(this, n)
            }
        }), k.each(["concat", "join", "slice"], function (t) {
            var e = l[t];
            k.prototype[t] = function () {
                return $(this, e.apply(this._wrapped, arguments))
            }
        }), k.prototype.value = function () {
            return this._wrapped
        }, k.prototype.valueOf = k.prototype.toJSON = k.prototype.value, k.prototype.toString = function () {
            return "" + this._wrapped
        }, i = [], r = function () {
            return k
        }.apply(e, i), !(void 0 !== r && (t.exports = r))
    }).call(this)
}, function (module, exports) {
    module.exports = function (obj) {
        var __t, __p = "", __j = Array.prototype.join, print = function () {
            __p += __j.call(arguments, "")
        };
        with (obj || {}) __p += '<div class="bi-alert ' + (null == (__t = type) ? "" : __t) + '" style="width:' + (null == (__t = width) ? "" : __t) + '">\n    <div class="bi-alert-bd">\n        ', __p += "confirm" === type ? '\n            <p class="mod-tips">\n                <span class="vm-message">' + (null == (__t = message) ? "" : __t) + '</span>\n                <span class="vm-tips">' + (null == (__t = tips) ? "" : __t) + '</span>\n            </p>\n            <p class="mod-link">\n                <a class="vm-know bi-alert-close" href="javascript:;">知道了</a>\n                <a class="vm-cart" href="//cart.mall.meizu.com">去购物车</a>\n            </p>\n        ' : '\n            <p class="mod-message bi-alert-close">\n                <i class="iconfont icon-' + (null == (__t = type) ? "" : __t) + '"></i>\n                <span>' + (null == (__t = message) ? "" : __t) + "</span>\n            </p>\n        ", __p += "\n    </div>\n</div>\n", "confirm" === type && (__p += '\n<div class="bi-backdrop">\n</div>\n'), __p += "";
        return __p
    }
}, function (t, e, n) {/*!
	 * snapup-timing.js
	 * @date 2017.7.20
	 * @author chenjinghui@meizu.com
	 * @version 0.0.1
	 */
    var i = n(29), r = (n(30), n(37), n(45)), o = n(56), s = {
        serverTime: i("#servertime"),
        message: i("#J_sanpUp"),
        btnBuyAll: i("#J_btnBuyNow").add("#J_btnBuyPropsEnter")
    }, a = {
        getSaleStatus: "//detail.mall.meizu.com/api/item/sale_status",
        getService: "//detail.mall.meizu.com/api/timestamp"
    }, c = function (t) {
        this.liveView = t, this.model = t.model, this.init(), this.handlerSoonSale(this.model)
    };
    c.prototype.init = function () {
        var t = this;
        t.liveView.listenTo(t.liveView.model, "change:skuId", t.handlerSoonSale.bind(t))
    }, c.prototype.handlerSoonSale = function (t) {
        var e = this, n = t.get("type"), i = !t.previous("skuId");
        switch (s.message.html("").removeClass("count-down"), n) {
            case 1:
                e.handlerGeneral(i);
                break;
            case 2:
                e.handlerPanicBuying(i)
        }
    }, c.prototype.getServerTime = function () {
        var t = i.Deferred();
        return i.ajax({url: a.getService, type: "get", dataType: "json", timeout: 4e3, cache: !1}).done(function (e) {
            e.success ? t.resolve(e.data) : t.reject(e)
        }).fail(function () {
            t.reject("网络异常，请稍后再试!")
        }), t.promise()
    }, c.prototype.handlerGeneral = function (t) {
        var e = this, n = e.model, i = n.get("activeStatus"), r = n.get("stock"), a = n.get("buyButton");
        1 === i && r > 0 ? s.btnBuyAll.text("立即购买").addClass("btn-danger").removeClass("disabled") : 1 === i && r <= 0 ? s.btnBuyAll.text(a).addClass("disabled") : 2 === i ? t ? (s.btnBuyAll.text("即将发售").addClass("disabled"), e.waitingTimeToString()) : o.getSkuSaleStatus(n).done(function (t) {
            1 === t.activeStatus ? s.btnBuyAll.text("立即购买").removeClass("disabled") : 2 === t.activeStatus && (s.btnBuyAll.text("即将发售").addClass("disabled"), e.waitingTimeToString(t.timestamp))
        }) : 3 === i && s.btnBuyAll.text("已下架").addClass("disabled")
    }, c.prototype.handlerPanicBuying = function (t) {
        var e = this, n = e.model, i = (e.liveView, n.get("activeStatus"));
        1 === i ? e.syncStateInPanicBuying() : 2 === i ? t ? (s.btnBuyAll.text("即将开始抢购").addClass("disabled"), e.waitingTimeToString()) : e.syncStateInPanicBuying() : 3 === i && s.btnBuyAll.text("活动已结束").addClass("disabled")
    }, c.prototype.syncStateInPanicBuying = function () {
        var t = this, e = t.model;
        o.getSkuSaleStatus(e).done(function (e) {
            if (1 === e.activeStatus) switch (e.stockStatus) {
                case 1:
                    r.isLogin() ? s.btnBuyAll.text("立即抢购").removeClass("disabled") : s.btnBuyAll.text("请先登录").removeClass("btn-danger disabled").addClass("notlogin");
                    break;
                case 2:
                    s.btnBuyAll.text("还有机会").addClass("disabled"), s.message.html("该商品有用户下单后未付款，还有机会抢到");
                    break;
                case 3:
                    s.btnBuyAll.text("已售罄").addClass("disabled")
            } else 2 === e.activeStatus ? (s.btnBuyAll.text("即将开始抢购").addClass("disabled"), t.waitingTimeToString(e.timestamp)) : 3 === e.activeStatus && s.btnBuyAll.text("活动已结束").addClass("disabled")
        })
    }, c.prototype.waitingTimeToString = function (t) {
        var e, n = this, i = n.model, o = t || Number(s.serverTime.val()), a = i.get("shelveTime"),
            c = 2 === i.get("type"), u = n.getWaitingTime(o), l = c ? n.countDownDoPanicBuying : n.countDownDoBuying,
            h = !1, d = [];
        return e = Math.ceil((a - o) / 1e3), n.timer && clearInterval(n.timer), e > 86400 ? d.push('&nbsp;<em id="J_panicBuyingCountDown">' + u + "</em> ") : e > 0 ? (d.push('距开售还剩 <em id="J_panicBuyingCountDown">' + u + "</em> "), c && !r.isLogin() && d.push("请预先登录账号"), n.timer = r.countDown(o, a, n.syncShelveTime.bind(n), l.bind(n))) : e <= 0 && (h = !0), s.message.html(d.join("，")).addClass("count-down"), h
    }, c.prototype.syncShelveTime = function (t) {
        var e = this.formatDate(t);
        i("#J_panicBuyingCountDown").text(e)
    }, c.prototype.formatDate = function (t) {
        var e = Math.floor(t % 86400 / 3600),
            n = Math.floor(t % 3600 / 60) < 10 ? "0" + Math.floor(t % 3600 / 60) : Math.floor(t % 3600 / 60),
            i = t % 60 < 10 ? "0" + t % 60 : t % 60;
        return e + "时" + n + "分" + i + "秒"
    }, c.prototype.getShowTime = function (t, e) {
        var n, i = new Date;
        return i.setTime(t), n = i.getMonth() + 1 + "月" + i.getDate() + "日 " + (i.getHours() >= 10 ? i.getHours() : "0" + i.getHours()) + ":" + (i.getMinutes() >= 10 ? i.getMinutes() : "0" + i.getMinutes()), "next" === e ? n = "下次开售：" + n : n += " 准时开售", n
    }, c.prototype.getWaitingTime = function (t, e) {
        var n, i, r = this, o = r.model.get("shelveTime"), a = t || Number(s.serverTime.val());
        return e = e || 0, n = Math.floor((o - a) / 1e3) - e, i = !(n < 0) && (n < 86400 ? r.formatDate(n) : r.getShowTime(o))
    }, c.prototype.countDownDoBuying = function () {
        var t = this, e = t.model;
        e.set("activeStatus", 1), s.btnBuyAll.text("立即购买").removeClass("disabled"), s.message.empty().removeClass("count-down")
    }, c.prototype.countDownDoPanicBuying = function () {
        var t = this, e = t.model;
        e.set("activeStatus", 1), r.isLogin() ? s.btnBuyAll.text("立即抢购").removeClass("disabled") : s.btnBuyAll.text("请先登录").removeClass("btn-danger disabled").addClass("notlogin"), s.message.empty().removeClass("count-down")
    }, t.exports = window._Snapup = c
}, function (t, e, n) {/*!
	 * delivery.js
	 * @date 2017.8.30
	 * @author chenjinghui@meizu.com
	 * @version 0.0.1
	 */
    var i = n(29), r = n(67), o = n(45), s = {
        sudaCon: i("#prod-suda-info"),
        siteText: i("#J_siteText"),
        siteStatus: i("#J_siteStatus"),
        summaryDiscount: i("#J_summaryDiscount")
    }, a = {
        getDefaultSite: "//me.m.meizu.com/vip/address/default_new_address",
        queryChildren: "//area.meizu.com/area/child/batch_query",
        fastArrival: "//detail.mall.meizu.com/api/sku/check_fast_arrival",
        ipLocate: "//detail.mall.meizu.com/api/ip/locate_city"
    }, c = function (t, e) {
        this.liveView = t, this.model = t.model, this.supportFastArrival = e, this.props = {
            origin: {
                province: "广东",
                provinceId: 18482,
                city: "广州市",
                cityId: 19033
            }, userSite: {}, activeSite: {}
        }, this.init()
    };
    c.prototype.init = function () {
        var t = this, e = t.liveView, n = t.model.get("isPackage");
        new r("#J_sudaSelector", t.activeHandler.bind(t)), t.liveView.listenTo(t.liveView.model, "change:skuId", t.handlerDelivery.bind(t)), n && e.listenTo(e.model, "change:packageSkuIds", t.queryFastArrival.bind(t)), t.getDefaultSite().done(function (e) {
            t.props.userSite = e, t.renderShowText(t.props.userSite), t.handlerDelivery()
        })
    }, c.prototype.getDefaultSite = function () {
        var t = this, e = i.Deferred();
        return o.isLogin() ? t.ajax(a.getDefaultSite, null, "get", "jsonp").done(function (t) {
            e.resolve(t)
        }).fail(function (n) {
            t.ipLocateCity().done(function (t) {
                e.resolve({province: t.province, provinceId: t.provinceId, city: t.city, cityId: t.cityId})
            }).fail(function () {
                e.resolve(t.props.origin)
            })
        }) : t.ipLocateCity().done(function (t) {
            e.resolve({province: t.province, provinceId: t.provinceId, city: t.city, cityId: t.cityId})
        }), e.promise()
    }, c.prototype.ipLocateCity = function () {
        var t = this, e = i.Deferred();
        return t.ajax(a.ipLocate, null, "get", "jsonp", !0).done(function (t) {
            e.resolve(t.location)
        }).fail(function (n) {
            e.resolve(t.props.origin)
        }), e.promise()
    }, c.prototype.handlerDelivery = function (t) {
        var e, n = this, t = n.model, i = t.get("isPreSale"), r = "";
        i ? (e = t.get("delaySendDayNum") || 15, r = '<a class="vm-icon" href="javascript:;"><i class="iconfont icon-pre-sale"></i>预售商品</a><span class="vm-msg">付款后预计' + e + "天内发货</span>", s.siteStatus.html(r).show(), s.summaryDiscount.html(r)) : (s.siteStatus.empty().hide(), s.summaryDiscount.empty(), n.supportFastArrival && n.queryFastArrival())
    }, c.prototype.renderShowText = function (t) {
        var e = ["province", "city", "area", "town"], n = [];
        t ? (i.each(e, function (e, i) {
            return !!t[i] && void n.push(t[i])
        }), s.siteText.html(n.join(" ")).removeClass("b-color9")) : s.siteText.html("请选择").addClass("b-color9")
    }, c.prototype.renderShowSite = function () {
        var t = this, e = [],
            n = (t.props.activeSite, t.props.userSite, t.props.activeSite[0] && t.props.activeSite[0].name || t.props.userSite.province),
            i = t.props.activeSite[1] && t.props.activeSite[1].name || t.props.userSite.city,
            r = t.props.activeSite[2] && t.props.activeSite[2].name || t.props.userSite.area,
            o = t.props.activeSite[3] && t.props.activeSite[3].name || t.props.userSite.town;
        i && e.push(i), r ? e.push(r) : e.unshift(n), o ? e.push(o) : e.push("【请选择】"), s.show.text(e.join(" "))
    }, c.prototype.activeHandler = function (t) {
        var e = this, n = ["province", "city", "area", "town"], r = {};
        4 === t.length && (e.props.activeSite = t, i.each(t, function (t, e) {
            r[n[t]] = e.name, r[n[t] + "Id"] = e.id
        }), e.renderShowText(r), e.handlerDelivery())
    }, c.prototype.queryFastArrival = function () {
        var t = this, e = t.model, n = t.props.activeSite[0] && t.props.activeSite[0].id || t.props.userSite.provinceId,
            r = t.props.activeSite[1] && t.props.activeSite[1].id || t.props.userSite.cityId,
            o = t.props.activeSite[2] && t.props.activeSite[2].id || t.props.userSite.areaId,
            c = t.props.activeSite[3] && t.props.activeSite[3].id || t.props.userSite.townId, u = e.get("isPreSale"),
            l = !e.get("isPackage") || "" !== e.get("activePackage"), h = e.get("quantity"), d = e.get("skuId"),
            p = e.get("packageSkuIds"), f = [];
        2 === e.get("type");
        !u && t.supportFastArrival && d && l && n && r && (f.push({
            id: livePropertyView.model.get("skuId"),
            num: h
        }), p && i.each(p, function (t, e) {
            f.push({id: e, num: h})
        }), t.ajax(a.fastArrival, {
            provinceId: n,
            cityId: r,
            areaId: o,
            townId: c,
            skus: JSON.stringify(f),
            type: 1
        }, "get", "jsonp").done(function (t) {
            var e = "", n = "", i = new Date(t.arrivalDate || 0);
            1 === t.fastArrivalStatus ? (e += '<a class="vm-icon" href="//store.meizu.com/marrive/summary.html" target="_blank"><i class="iconfont icon-suda2"></i>当日达</a>', e += '<span class="vm-msg">' + t.payTime + " 前支付，预计今天送达</span>", s.siteStatus.add(s.summaryDiscount).html(e).show()) : 2 === t.fastArrivalStatus ? (n = "明天（" + (i.getMonth() + 1) + "月" + i.getDate() + "日）", e += '<a class="vm-icon" href="//store.meizu.com/marrive/summary.html" target="_blank"><i class="iconfont icon-suda2"></i>次日达</a>', s.siteStatus.html(e + '<span class="vm-msg">' + t.payTime + " 前支付，预计" + n + "送达</span>").show(), s.summaryDiscount.html(e + '<span class="vm-msg">' + t.payTime + " 前支付，预计明天送达</span>").show()) : 3 === t.fastArrivalStatus ? (n = "后天（" + (i.getMonth() + 1) + "月" + i.getDate() + "日）", e = '<span class="vm-msg">' + t.payTime + " 前下单并支付，预计" + n + "送达</span>", s.siteStatus.add(s.summaryDiscount).html(e).show()) : 0 === t.fastArrivalStatus && 1 === t.fastArrivalEnable ? (e = '<span class="vm-msg">' + t.payTime + " 前付款，当天发货</span>", s.siteStatus.add(s.summaryDiscount).html(e).show()) : 0 === t.fastArrivalStatus && 2 === t.fastArrivalEnable ? (e = '<span class="vm-msg">付款后24h内快速发货</span>', s.siteStatus.add(s.summaryDiscount).html(e).show()) : (s.siteStatus.empty().hide(), s.summaryDiscount.empty())
        }))
    }, c.prototype.ajax = function (t, e, n, r, o) {
        var s = i.Deferred(), a = {
            url: t,
            type: n ? n : "get",
            data: e ? e : null,
            dataType: r ? r : "json",
            timeout: 4e3,
            cache: o || !1
        };
        return o && (a.jsonpCallback = "ipLocateCallback"), i.ajax(a).done(function (t) {
            t.success || 200 === t.code && t.data ? s.resolve(t.data) : s.reject(t.message)
        }).fail(function () {
            s.reject("请求失败")
        }), s.promise()
    }, t.exports = window._Site = c
}, function (t, e, n) {
    var i, r = n(29), o = n(68), s = n(46), a = n(69), c = new s;
    !function (s) {
        "use strict";

        function u(t, e) {
            for (var n in e) t[n] = e[n];
            return t
        }

        function l(t, e) {
            var n = "string" == typeof t ? h.querySelector(t) : t;
            n && (this.targetElem = n, this.checked = [], e && (this.callback = e), this.bindEvent())
        }

        var h = s.document, d = new o;
        u(l.prototype, {
            bindEvent: function () {
                var t = this, e = r(this.targetElem);
                e.on("click", function () {
                    d.open({
                        eventType: "click",
                        title: "配送至",
                        xclose: !0,
                        content: '<div id="j-loca-checked" class="loca-checked">请选择</div><div id="j-loca-list" class="loca-list"><ul></ul></div>',
                        clazz: "loca-dialog",
                        buttons: [],
                        onOpen: function () {
                            r(document.body).addClass("lock"), document.querySelector(".dialog-overlay").addEventListener("touchmove", function (t) {
                                t.preventDefault()
                            }, !1), document.querySelector(".dialog-body").addEventListener("touchmove", function (t) {
                                t.preventDefault()
                            }, !1);
                            var e = r("#j-loca-list"), n = r("#j-loca-checked"), i = [];
                            t.checked = [], t.getSubArea(0, e), n.on("click", "span", function (o) {
                                var s = r(this).data("pid"), a = r(this).data("level");
                                i.splice(a - 1), t.getSubArea(s, e), i.length ? n.html(i.join(" ")) : n.html("请选择")
                            }), e.on("tap", "li", function (o) {
                                var s = r(this), a = s.data("id"), c = s.data("pid"), u = s.data("level"), l = s.text(),
                                    h = s.data("zipcode");
                                t.checked[u - 1] = {
                                    id: a,
                                    parentId: c,
                                    name: l,
                                    level: u,
                                    zipCode: h
                                }, i[u - 1] = '<span data-pid="' + c + '" data-level="' + u + '">' + l + "</span>", n.html(i.join(" ")), i.length < 4 ? t.getSubArea(a, e) : (t.callback(t.checked), d.close(), r(document.body).removeClass("lock"))
                            })
                        },
                        onClose: function () {
                            r(document.body).removeClass("lock")
                        }
                    })
                })
            }, getSubArea: function (t, e) {
                var n = this, i = r(this.targetElem);
                r.ajax({url: i.data("url") + t, dataType: "jsonp"}).done(function (t) {
                    t.success ? n.renderSubArea(t.data, e) : c.open("获取地址失败，稍后再试试~")
                }).fail(function () {
                    c.open("服务器打盹了，请稍后再试~")
                })
            }, renderSubArea: function (t, e) {
                var n = "";
                r.each(t, function (t, e) {
                    var i = e.parentId, r = e.zipCode, o = r ? 'data-zipcode="' + r + '"' : "";
                    n += '<li data-id="' + e.id + '" data-pid="' + i + '" data-level="' + e.level + '"' + o + ">" + e.name + "</li>"
                }), e.find("ul").html(n), this.locaScroll && this.locaScroll.destroy(), this.locaScroll = new a("#j-loca-list")
            }, destroy: function () {
                this.locaScroll && this.locaScroll.destroy()
            }
        }), s.SeleLocation = l, "undefined" != typeof t && t.exports ? t.exports = l : (n(34).cmd || n(35)) && (i = function (t, e, n) {
            return l
        }.call(e, n, e, t), !(void 0 !== i && (t.exports = i)))
    }(window)
}, function (t, e, n) {
    var i;
    !function (r, o) {
        "use strict";

        function s() {
            this.isCreated = !1
        }

        var a = o(r.document.body), c = s.prototype;
        o.extend(c, {
            options: {
                eventType: "tap",
                touchmove: !1,
                content: "",
                buttons: [{text: "确定"}, {text: "取消", dismiss: !0}],
                backdrop: !0
            }
        }), o.extend(c, {
            _createDialog: function () {
                var t = this, e = this.config;
                t.dialog = o('<div class="dialog-popup"/>').addClass(e.clazz).html('<div class="dialog-body"></div>'), t.dialogBody = t.dialog.find(".dialog-body"), t.dialogHeader = o('<div class="dialog-header"/>').appendTo(t.dialogBody), t.dialogBackdrop = o('<div class="dialog-overlay"/>').prependTo(t.dialog), void 0 !== e.xclose ? t.dialogClose = o('<a data-dismiss="true" class="close"><i>&times;</i></a>').appendTo(t.dialogHeader) : t.dialogHeader.find(".close").remove(), void 0 !== e.title ? t.dialogTitle = o('<h4 class="dialog-title">' + e.title + "</h4>").appendTo(t.dialogHeader) : t.dialogTitle = o('<h4 class="dialog-title"/>'), t.dialogContent = o('<div class="dialog-content"/>').appendTo(t.dialogBody), t.dialogButtons = o('<div class="dialog-buttons"/>').appendTo(t.dialogBody)
            }, _renderDialog: function () {
                var t = this, e = this.config, n = this.dialog, i = e.eventType;
                void 0 !== e.clazz && (n[0].className = "dialog-popup " + e.clazz), void 0 !== e.width && o.isNumeric(e.width) && this.dialogBody.css("width", e.width), void 0 !== e.backdrop && ("static" === e.backdrop ? this.dialogBackdrop.removeAttr("data-dismiss").off(i + ".dismiss.dialog") : e.backdrop === !0 ? this.dialogBackdrop.attr("data-dismiss", "true") : e.backdrop === !1 && this.dialogBackdrop.remove()), void 0 !== e.title && t.dialogTitle.html(e.title).prependTo(t.dialogHeader), t.dialogContent.html(e.content), e.buttons.length > 0 ? (t.dialogButtons.html(""), o.each(e.buttons, function (e, n) {
                    var r = void 0 !== n.clazz ? "btn " + n.clazz : "btn", s = void 0 === n.dismiss || n.dismiss,
                        a = {type: "button", text: n.text, class: r, "data-dismiss": s}, c = o("<button/>", a);
                    if (c.appendTo(t.dialogButtons), void 0 !== n.click && o.isFunction(n.click)) {
                        var u = n.click;
                        c.on(i, u)
                    }
                })) : t.dialogButtons.html("")
            }, _bindEvent: function (t) {
                var e = this, n = this.config, i = n.eventType + ".dismiss.dialog";
                this.dialog.on(i, '[data-dismiss="true"]', function (t) {
                    e.close()
                }), n.touchmove || this.dialog.on("touchmove", function (t) {
                    t.preventDefault()
                })
            }, onClose: function (t) {
                void 0 !== t && o.isFunction(t) && (this.handlerOnClose = t)
            }, onOpen: function (t) {
                void 0 !== t && o.isFunction(t) && (this.handlerOnOpen = t)
            }, set: function (t) {
                return this.config = o.extend({}, this.config, t), this._renderDialog(), this.dialog.focus(), this
            }, open: function (t) {
                var e = this;
                return this.config = t = o.extend({}, s.prototype.options, t), a.hasClass("dialog-open") || (this.isCreated || (this.isCreated = !0, this._createDialog(), this.dialog.appendTo(a), setTimeout(function () {
                    e._bindEvent()
                }, 0)), this._renderDialog(), this.dialog.show(), this.dialog.addClass("open"), a.addClass("dialog-open"), void 0 !== t.onOpen && o.isFunction(t.onOpen) && t.onOpen.apply(this, arguments), void 0 !== e.handlerOnOpen && e.handlerOnOpen.apply(this, arguments)), this
            }, close: function () {
                var t = this;
                this.config;
                return t.dialog.removeClass("open"), setTimeout(function () {
                    t.dialog.hide(), t.isOpen = !1, a.removeClass("dialog-open")
                }, 160), this
            }
        }), window.Dialog = s, "undefined" != typeof t && t.exports ? t.exports = s : (n(34).cmd || n(35)) && (i = function (t, e, n) {
            return s
        }.call(e, n, e, t), !(void 0 !== i && (t.exports = i)))
    }(window, Zepto)
}, function (t, e, n) {
    var i;
    /*! iScroll v5.1.3 ~ (c) 2008-2014 Matteo Spinelli ~ http://cubiq.org/license */
    !function (r, o, s) {
        function a(t, e) {
            this.wrapper = "string" == typeof t ? o.querySelector(t) : t, this.scroller = this.wrapper.children[0], this.scrollerStyle = this.scroller.style, this.options = {
                startX: 0,
                startY: 0,
                scrollY: !0,
                directionLockThreshold: 5,
                momentum: !0,
                bounce: !0,
                bounceTime: 600,
                bounceEasing: "",
                preventDefault: !0,
                preventDefaultException: {tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/},
                HWCompositing: !0,
                useTransition: !0,
                useTransform: !0
            };
            for (var n in e) this.options[n] = e[n];
            this.translateZ = this.options.HWCompositing && u.hasPerspective ? " translateZ(0)" : "", this.options.useTransition = u.hasTransition && this.options.useTransition, this.options.useTransform = u.hasTransform && this.options.useTransform, this.options.eventPassthrough = this.options.eventPassthrough === !0 ? "vertical" : this.options.eventPassthrough, this.options.preventDefault = !this.options.eventPassthrough && this.options.preventDefault, this.options.scrollY = "vertical" != this.options.eventPassthrough && this.options.scrollY, this.options.scrollX = "horizontal" != this.options.eventPassthrough && this.options.scrollX, this.options.freeScroll = this.options.freeScroll && !this.options.eventPassthrough, this.options.directionLockThreshold = this.options.eventPassthrough ? 0 : this.options.directionLockThreshold, this.options.bounceEasing = "string" == typeof this.options.bounceEasing ? u.ease[this.options.bounceEasing] || u.ease.circular : this.options.bounceEasing, this.options.resizePolling = void 0 === this.options.resizePolling ? 60 : this.options.resizePolling, this.options.tap === !0 && (this.options.tap = "tap"), this.x = 0, this.y = 0, this.directionX = 0, this.directionY = 0, this._events = {}, this._init(), this.refresh(), this.scrollTo(this.options.startX, this.options.startY), this.enable()
        }

        var c = r.requestAnimationFrame || r.webkitRequestAnimationFrame || r.mozRequestAnimationFrame || r.oRequestAnimationFrame || r.msRequestAnimationFrame || function (t) {
            r.setTimeout(t, 1e3 / 60)
        }, u = function () {
            function t(t) {
                return i !== !1 && ("" === i ? t : i + t.charAt(0).toUpperCase() + t.substr(1))
            }

            var e = {}, n = o.createElement("div").style, i = function () {
                for (var t, e = ["t", "webkitT", "MozT", "msT", "OT"], i = 0, r = e.length; i < r; i++) if (t = e[i] + "ransform", t in n) return e[i].substr(0, e[i].length - 1);
                return !1
            }();
            e.getTime = Date.now || function () {
                return (new Date).getTime()
            }, e.extend = function (t, e) {
                for (var n in e) t[n] = e[n]
            }, e.addEvent = function (t, e, n, i) {
                t.addEventListener(e, n, !!i)
            }, e.removeEvent = function (t, e, n, i) {
                t.removeEventListener(e, n, !!i)
            }, e.prefixPointerEvent = function (t) {
                return r.MSPointerEvent ? "MSPointer" + t.charAt(9).toUpperCase() + t.substr(10) : t
            }, e.momentum = function (t, e, n, i, r, o) {
                var a, c, u = t - e, l = s.abs(u) / n;
                return o = void 0 === o ? 6e-4 : o, a = t + l * l / (2 * o) * (u < 0 ? -1 : 1), c = l / o, a < i ? (a = r ? i - r / 2.5 * (l / 8) : i, u = s.abs(a - t), c = u / l) : a > 0 && (a = r ? r / 2.5 * (l / 8) : 0, u = s.abs(t) + a, c = u / l), {
                    destination: s.round(a),
                    duration: c
                }
            };
            var a = t("transform");
            return e.extend(e, {
                hasTransform: a !== !1,
                hasPerspective: t("perspective") in n,
                hasTouch: "ontouchstart" in r,
                hasPointer: r.PointerEvent || r.MSPointerEvent,
                hasTransition: t("transition") in n
            }), e.isBadAndroid = /Android /.test(r.navigator.appVersion) && !/Chrome\/\d/.test(r.navigator.appVersion), e.extend(e.style = {}, {
                transform: a,
                transitionTimingFunction: t("transitionTimingFunction"),
                transitionDuration: t("transitionDuration"),
                transitionDelay: t("transitionDelay"),
                transformOrigin: t("transformOrigin")
            }), e.hasClass = function (t, e) {
                var n = new RegExp("(^|\\s)" + e + "(\\s|$)");
                return n.test(t.className)
            }, e.addClass = function (t, n) {
                if (!e.hasClass(t, n)) {
                    var i = t.className.split(" ");
                    i.push(n), t.className = i.join(" ")
                }
            }, e.removeClass = function (t, n) {
                if (e.hasClass(t, n)) {
                    var i = new RegExp("(^|\\s)" + n + "(\\s|$)", "g");
                    t.className = t.className.replace(i, " ")
                }
            }, e.offset = function (t) {
                for (var e = -t.offsetLeft, n = -t.offsetTop; t = t.offsetParent;) e -= t.offsetLeft, n -= t.offsetTop;
                return {left: e, top: n}
            }, e.preventDefaultException = function (t, e) {
                for (var n in e) if (e[n].test(t[n])) return !0;
                return !1
            }, e.extend(e.eventType = {}, {
                touchstart: 1,
                touchmove: 1,
                touchend: 1,
                mousedown: 2,
                mousemove: 2,
                mouseup: 2,
                pointerdown: 3,
                pointermove: 3,
                pointerup: 3,
                MSPointerDown: 3,
                MSPointerMove: 3,
                MSPointerUp: 3
            }), e.extend(e.ease = {}, {
                quadratic: {
                    style: "cubic-bezier(0.25, 0.46, 0.45, 0.94)", fn: function (t) {
                        return t * (2 - t)
                    }
                }, circular: {
                    style: "cubic-bezier(0.1, 0.57, 0.1, 1)", fn: function (t) {
                        return s.sqrt(1 - --t * t)
                    }
                }, back: {
                    style: "cubic-bezier(0.175, 0.885, 0.32, 1.275)", fn: function (t) {
                        var e = 4;
                        return (t -= 1) * t * ((e + 1) * t + e) + 1
                    }
                }, bounce: {
                    style: "", fn: function (t) {
                        return (t /= 1) < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375
                    }
                }, elastic: {
                    style: "", fn: function (t) {
                        var e = .22, n = .4;
                        return 0 === t ? 0 : 1 == t ? 1 : n * s.pow(2, -10 * t) * s.sin((t - e / 4) * (2 * s.PI) / e) + 1
                    }
                }
            }), e.tap = function (t, e) {
                var n = o.createEvent("Event");
                n.initEvent(e, !0, !0), n.pageX = t.pageX, n.pageY = t.pageY, t.target.dispatchEvent(n)
            }, e.click = function (t) {
                var e, n = t.target;
                /(SELECT|INPUT|TEXTAREA)/i.test(n.tagName) || (e = o.createEvent("MouseEvents"), e.initMouseEvent("click", !0, !0, t.view, 1, n.screenX, n.screenY, n.clientX, n.clientY, t.ctrlKey, t.altKey, t.shiftKey, t.metaKey, 0, null), e._constructed = !0, n.dispatchEvent(e))
            }, e
        }();
        a.prototype = {
            version: "5.1.3", _init: function () {
                this._initEvents()
            }, destroy: function () {
                this._initEvents(!0), this._execEvent("destroy")
            }, _transitionEnd: function (t) {
                t.target == this.scroller && this.isInTransition && (this._transitionTime(), this.resetPosition(this.options.bounceTime) || (this.isInTransition = !1, this._execEvent("scrollEnd")))
            }, _start: function (t) {
                if ((1 == u.eventType[t.type] || 0 === t.button) && this.enabled && (!this.initiated || u.eventType[t.type] === this.initiated)) {
                    !this.options.preventDefault || u.isBadAndroid || u.preventDefaultException(t.target, this.options.preventDefaultException) || t.preventDefault();
                    var e, n = t.touches ? t.touches[0] : t;
                    this.initiated = u.eventType[t.type], this.moved = !1, this.distX = 0, this.distY = 0, this.directionX = 0, this.directionY = 0, this.directionLocked = 0, this._transitionTime(), this.startTime = u.getTime(), this.options.useTransition && this.isInTransition ? (this.isInTransition = !1, e = this.getComputedPosition(), this._translate(s.round(e.x), s.round(e.y)), this._execEvent("scrollEnd")) : !this.options.useTransition && this.isAnimating && (this.isAnimating = !1, this._execEvent("scrollEnd")), this.startX = this.x, this.startY = this.y, this.absStartX = this.x, this.absStartY = this.y, this.pointX = n.pageX, this.pointY = n.pageY, this._execEvent("beforeScrollStart")
                }
            }, _move: function (t) {
                if (this.enabled && u.eventType[t.type] === this.initiated) {
                    this.options.preventDefault && t.preventDefault();
                    var e, n, i, r, o = t.touches ? t.touches[0] : t, a = o.pageX - this.pointX,
                        c = o.pageY - this.pointY, l = u.getTime();
                    if (this.pointX = o.pageX, this.pointY = o.pageY, this.distX += a, this.distY += c, i = s.abs(this.distX), r = s.abs(this.distY), !(l - this.endTime > 300 && i < 10 && r < 10)) {
                        if (this.directionLocked || this.options.freeScroll || (i > r + this.options.directionLockThreshold ? this.directionLocked = "h" : r >= i + this.options.directionLockThreshold ? this.directionLocked = "v" : this.directionLocked = "n"), "h" == this.directionLocked) {
                            if ("vertical" == this.options.eventPassthrough) t.preventDefault(); else if ("horizontal" == this.options.eventPassthrough) return void(this.initiated = !1);
                            c = 0
                        } else if ("v" == this.directionLocked) {
                            if ("horizontal" == this.options.eventPassthrough) t.preventDefault(); else if ("vertical" == this.options.eventPassthrough) return void(this.initiated = !1);
                            a = 0
                        }
                        a = this.hasHorizontalScroll ? a : 0, c = this.hasVerticalScroll ? c : 0, e = this.x + a, n = this.y + c, (e > 0 || e < this.maxScrollX) && (e = this.options.bounce ? this.x + a / 3 : e > 0 ? 0 : this.maxScrollX), (n > 0 || n < this.maxScrollY) && (n = this.options.bounce ? this.y + c / 3 : n > 0 ? 0 : this.maxScrollY), this.directionX = a > 0 ? -1 : a < 0 ? 1 : 0, this.directionY = c > 0 ? -1 : c < 0 ? 1 : 0, this.moved || this._execEvent("scrollStart"), this.moved = !0, this._translate(e, n), l - this.startTime > 300 && (this.startTime = l, this.startX = this.x, this.startY = this.y)
                    }
                }
            }, _end: function (t) {
                if (this.enabled && u.eventType[t.type] === this.initiated) {
                    this.options.preventDefault && !u.preventDefaultException(t.target, this.options.preventDefaultException) && t.preventDefault();
                    var e, n, i = (t.changedTouches ? t.changedTouches[0] : t, u.getTime() - this.startTime),
                        r = s.round(this.x), o = s.round(this.y), a = s.abs(r - this.startX),
                        c = s.abs(o - this.startY), l = 0, h = "";
                    if (this.isInTransition = 0, this.initiated = 0, this.endTime = u.getTime(), !this.resetPosition(this.options.bounceTime)) return this.scrollTo(r, o), this.moved ? this._events.flick && i < 200 && a < 100 && c < 100 ? void this._execEvent("flick") : (this.options.momentum && i < 300 && (e = this.hasHorizontalScroll ? u.momentum(this.x, this.startX, i, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : {
                        destination: r,
                        duration: 0
                    }, n = this.hasVerticalScroll ? u.momentum(this.y, this.startY, i, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : {
                        destination: o,
                        duration: 0
                    }, r = e.destination, o = n.destination, l = s.max(e.duration, n.duration), this.isInTransition = 1), r != this.x || o != this.y ? ((r > 0 || r < this.maxScrollX || o > 0 || o < this.maxScrollY) && (h = u.ease.quadratic), void this.scrollTo(r, o, l, h)) : void this._execEvent("scrollEnd")) : (this.options.tap && u.tap(t, this.options.tap), this.options.click && u.click(t), void this._execEvent("scrollCancel"))
                }
            }, _resize: function () {
                var t = this;
                clearTimeout(this.resizeTimeout), this.resizeTimeout = setTimeout(function () {
                    t.refresh()
                }, this.options.resizePolling)
            }, resetPosition: function (t) {
                var e = this.x, n = this.y;
                return t = t || 0, !this.hasHorizontalScroll || this.x > 0 ? e = 0 : this.x < this.maxScrollX && (e = this.maxScrollX), !this.hasVerticalScroll || this.y > 0 ? n = 0 : this.y < this.maxScrollY && (n = this.maxScrollY), (e != this.x || n != this.y) && (this.scrollTo(e, n, t, this.options.bounceEasing), !0)
            }, disable: function () {
                this.enabled = !1
            }, enable: function () {
                this.enabled = !0
            }, refresh: function () {
                this.wrapper.offsetHeight;
                this.wrapperWidth = this.wrapper.clientWidth, this.wrapperHeight = this.wrapper.clientHeight, this.scrollerWidth = this.scroller.offsetWidth, this.scrollerHeight = this.scroller.offsetHeight, this.maxScrollX = this.wrapperWidth - this.scrollerWidth, this.maxScrollY = this.wrapperHeight - this.scrollerHeight, this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0, this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0, this.hasHorizontalScroll || (this.maxScrollX = 0, this.scrollerWidth = this.wrapperWidth), this.hasVerticalScroll || (this.maxScrollY = 0, this.scrollerHeight = this.wrapperHeight), this.endTime = 0, this.directionX = 0, this.directionY = 0, this.wrapperOffset = u.offset(this.wrapper), this._execEvent("refresh"), this.resetPosition()
            }, on: function (t, e) {
                this._events[t] || (this._events[t] = []), this._events[t].push(e)
            }, off: function (t, e) {
                if (this._events[t]) {
                    var n = this._events[t].indexOf(e);
                    n > -1 && this._events[t].splice(n, 1)
                }
            }, _execEvent: function (t) {
                if (this._events[t]) {
                    var e = 0, n = this._events[t].length;
                    if (n) for (; e < n; e++) this._events[t][e].apply(this, [].slice.call(arguments, 1))
                }
            }, scrollBy: function (t, e, n, i) {
                t = this.x + t, e = this.y + e, n = n || 0, this.scrollTo(t, e, n, i)
            }, scrollTo: function (t, e, n, i) {
                i = i || u.ease.circular, this.isInTransition = this.options.useTransition && n > 0, !n || this.options.useTransition && i.style ? (this._transitionTimingFunction(i.style), this._transitionTime(n), this._translate(t, e)) : this._animate(t, e, n, i.fn)
            }, scrollToElement: function (t, e, n, i, r) {
                if (t = t.nodeType ? t : this.scroller.querySelector(t)) {
                    var o = u.offset(t);
                    o.left -= this.wrapperOffset.left, o.top -= this.wrapperOffset.top, n === !0 && (n = s.round(t.offsetWidth / 2 - this.wrapper.offsetWidth / 2)), i === !0 && (i = s.round(t.offsetHeight / 2 - this.wrapper.offsetHeight / 2)), o.left -= n || 0, o.top -= i || 0, o.left = o.left > 0 ? 0 : o.left < this.maxScrollX ? this.maxScrollX : o.left, o.top = o.top > 0 ? 0 : o.top < this.maxScrollY ? this.maxScrollY : o.top, e = void 0 === e || null === e || "auto" === e ? s.max(s.abs(this.x - o.left), s.abs(this.y - o.top)) : e, this.scrollTo(o.left, o.top, e, r)
                }
            }, _transitionTime: function (t) {
                t = t || 0, this.scrollerStyle[u.style.transitionDuration] = t + "ms", !t && u.isBadAndroid && (this.scrollerStyle[u.style.transitionDuration] = "0.001s")
            }, _transitionTimingFunction: function (t) {
                this.scrollerStyle[u.style.transitionTimingFunction] = t
            }, _translate: function (t, e) {
                this.options.useTransform ? this.scrollerStyle[u.style.transform] = "translate(" + t + "px," + e + "px)" + this.translateZ : (t = s.round(t), e = s.round(e), this.scrollerStyle.left = t + "px", this.scrollerStyle.top = e + "px"), this.x = t, this.y = e
            }, _initEvents: function (t) {
                var e = t ? u.removeEvent : u.addEvent, n = this.options.bindToWrapper ? this.wrapper : r;
                e(r, "orientationchange", this), e(r, "resize", this), this.options.click && e(this.wrapper, "click", this, !0), this.options.disableMouse || (e(this.wrapper, "mousedown", this), e(n, "mousemove", this), e(n, "mousecancel", this), e(n, "mouseup", this)), u.hasPointer && !this.options.disablePointer && (e(this.wrapper, u.prefixPointerEvent("pointerdown"), this), e(n, u.prefixPointerEvent("pointermove"), this), e(n, u.prefixPointerEvent("pointercancel"), this), e(n, u.prefixPointerEvent("pointerup"), this)), u.hasTouch && !this.options.disableTouch && (e(this.wrapper, "touchstart", this), e(n, "touchmove", this), e(n, "touchcancel", this), e(n, "touchend", this)), e(this.scroller, "transitionend", this), e(this.scroller, "webkitTransitionEnd", this), e(this.scroller, "oTransitionEnd", this), e(this.scroller, "MSTransitionEnd", this)
            }, getComputedPosition: function () {
                var t, e, n = r.getComputedStyle(this.scroller, null);
                return this.options.useTransform ? (n = n[u.style.transform].split(")")[0].split(", "), t = +(n[12] || n[4]), e = +(n[13] || n[5])) : (t = +n.left.replace(/[^-\d.]/g, ""), e = +n.top.replace(/[^-\d.]/g, "")), {
                    x: t,
                    y: e
                }
            }, _animate: function (t, e, n, i) {
                function r() {
                    var d, p, f, v = u.getTime();
                    return v >= h ? (o.isAnimating = !1, o._translate(t, e), void(o.resetPosition(o.options.bounceTime) || o._execEvent("scrollEnd"))) : (v = (v - l) / n, f = i(v), d = (t - s) * f + s, p = (e - a) * f + a, o._translate(d, p), void(o.isAnimating && c(r)))
                }

                var o = this, s = this.x, a = this.y, l = u.getTime(), h = l + n;
                this.isAnimating = !0, r()
            }, handleEvent: function (t) {
                switch (t.type) {
                    case"touchstart":
                    case"pointerdown":
                    case"MSPointerDown":
                    case"mousedown":
                        this._start(t);
                        break;
                    case"touchmove":
                    case"pointermove":
                    case"MSPointerMove":
                    case"mousemove":
                        this._move(t);
                        break;
                    case"touchend":
                    case"pointerup":
                    case"MSPointerUp":
                    case"mouseup":
                    case"touchcancel":
                    case"pointercancel":
                    case"MSPointerCancel":
                    case"mousecancel":
                        this._end(t);
                        break;
                    case"orientationchange":
                    case"resize":
                        this._resize();
                        break;
                    case"transitionend":
                    case"webkitTransitionEnd":
                    case"oTransitionEnd":
                    case"MSTransitionEnd":
                        this._transitionEnd(t);
                        break;
                    case"wheel":
                    case"DOMMouseScroll":
                    case"mousewheel":
                        this._wheel(t);
                        break;
                    case"keydown":
                        this._key(t);
                        break;
                    case"click":
                        t._constructed || (t.preventDefault(), t.stopPropagation())
                }
            }
        }, a.utils = u, r.IScroll = a, "undefined" != typeof t && t.exports ? t.exports = a : (n(34).cmd || n(35)) && (i = function (t, e, n) {
            return a
        }.call(e, n, e, t), !(void 0 !== i && (t.exports = i)))
    }(window, document, Math)
}, function (t, e, n) {
    function i(t) {
        var e = this;
        e.liveView = t, e.model = t.model, e.imgLoaded = [], t.listenTo(e.model, "change:images", e.updateImages.bind(e)), e.renderSliders(), t.preSaleIcon()
    }

    /*!
	 * swipe-showcase.js
	 * @date 2016.3.15
	 * @author chenjinghui@meizu.com
	 * @version 0.0.1
	 */
    var r = n(29), o = n(45), s = n(71), a = {swipe: r("#prd-sliders"), booth: r("#J_summaryPicBooth")};
    i.prototype.updateImages = function (t, e) {
        var n = this, i = o.imageUrlProcess(e[0], 240);
        a.booth.attr({src: i, names: t.get("names")}), n.renderSliders(), n.preloadImages(e)
    }, i.prototype.preloadImages = function (t) {
        var e, n = this;
        t && t.length && (e = r.map(t, function (t) {
            return o.imageUrlProcess(t, 480)
        }), r.each(e, function (t, e) {
            if (r.inArray(e, n.imgLoaded) === -1) {
                var i = new Image;
                i.src = e, i.complete ? n.imgLoaded.push(e) : i.onload = i.onerror = function () {
                    n.imgLoaded.push(i), i.onload = i.onerror = null
                }
            }
        }))
    }, i.prototype.renderSummaryPic = function (t) {
        r("#J_summaryPicBooth").attr("src", o.imageUrlProcess(t, 240))
    }, i.prototype.renderSliders = function () {
        var t = this, e = t.model, n = e.get("images"), i = "";
        if (n && n.length) {
            t.renderSummaryPic(n[0]), r.each(n, function (t, e) {
                "" !== e && (e = o.imageUrlProcess(e, 480), i += '<div class="item"><img src="' + e + '" /></div>')
            }), a.swipe.find(".swipe-wrap").html(i), window.prodSwipe && prodSwipe.kill(), window.prodSwipe = new s(a.swipe[0], {
                continuous: !1,
                callback: function (t, e) {
                    var n = a.swipe.find(".poin span"), i = prodSwipe.getNumSlides();
                    n.removeClass("active"), n.eq(t % i).addClass("active")
                }
            });
            var c = prodSwipe.getNumSlides();
            if (c >= 2) {
                for (var u = "", l = 0; l < c; l++) u += 0 === l ? '<span class="active" data-index="' + l + '"></span>' : '<span data-index="' + l + '"></span>';
                a.swipe.find(".poin").html(u)
            } else a.swipe.find(".poin").html("")
        }
    }, t.exports = window._SwipeShowcase = i
}, function (t, e, n) {
    function i(t, e) {
        "use strict";

        function n() {
            v = b.children, y = v.length, v.length < 2 && (e.continuous = !1), f.transitions && e.continuous && v.length < 3 && (b.appendChild(v[0].cloneNode(!0)), b.appendChild(b.children[1].cloneNode(!0)), v = b.children), m = new Array(v.length), g = t.getBoundingClientRect().width || t.offsetWidth, b.style.width = v.length * g + "px";
            for (var n = v.length; n--;) {
                var i = v[n];
                i.style.width = g + "px", i.setAttribute("data-index", n), f.transitions && (i.style.left = n * -g + "px", a(n, w > n ? -g : w < n ? g : 0, 0))
            }
            e.continuous && f.transitions && (a(o(w - 1), -g, 0), a(o(w + 1), g, 0)), f.transitions || (b.style.left = w * -g + "px"), t.style.visibility = "visible"
        }

        function i() {
            e.continuous ? s(w - 1) : w && s(w - 1)
        }

        function r() {
            e.continuous ? s(w + 1) : w < v.length - 1 && s(w + 1)
        }

        function o(t) {
            return (v.length + t % v.length) % v.length
        }

        function s(t, n) {
            if (w != t) {
                if (f.transitions) {
                    var i = Math.abs(w - t) / (w - t);
                    if (e.continuous) {
                        var r = i;
                        i = -m[o(t)] / g, i !== r && (t = -i * v.length + t)
                    }
                    for (var s = Math.abs(w - t) - 1; s--;) a(o((t > w ? t : w) - s - 1), g * i, 0);
                    t = o(t), a(w, g * i, n || _), a(t, 0, n || _), e.continuous && a(o(t - i), -(g * i), 0)
                } else t = o(t), u(w * -g, t * -g, n || _);
                w = t, p(e.callback && e.callback(w, v[w]))
            }
        }

        function a(t, e, n) {
            c(t, e, n), m[t] = e
        }

        function c(t, e, n) {
            var i = v[t], r = i && i.style;
            r && (r.webkitTransitionDuration = r.MozTransitionDuration = r.msTransitionDuration = r.OTransitionDuration = r.transitionDuration = n + "ms", r.webkitTransform = "translate(" + e + "px,0)translateZ(0)", r.msTransform = r.MozTransform = r.OTransform = "translateX(" + e + "px)")
        }

        function u(t, n, i) {
            if (!i) return void(b.style.left = n + "px");
            var r = +new Date, o = setInterval(function () {
                var s = +new Date - r;
                return s > i ? (b.style.left = n + "px", T && l(), e.transitionEnd && e.transitionEnd.call(event, w, v[w]), void clearInterval(o)) : void(b.style.left = (n - t) * (Math.floor(s / i * 100) / 100) + t + "px")
            }, 4)
        }

        function l() {
            k = setTimeout(r, T)
        }

        function h() {
            T = e.auto > 0 ? e.auto : 0, clearTimeout(k)
        }

        var d = function () {
        }, p = function (t) {
            setTimeout(t || d, 0)
        }, f = {
            addEventListener: !!window.addEventListener,
            touch: "ontouchstart" in window || window.DocumentTouch && document instanceof DocumentTouch,
            transitions: function (t) {
                var e = ["transitionProperty", "WebkitTransition", "MozTransition", "OTransition", "msTransition"];
                for (var n in e) if (void 0 !== t.style[e[n]]) return !0;
                return !1
            }(document.createElement("swipe"))
        };
        if (t) {
            var v, m, g, y, b = t.children[0];
            e = e || {};
            var w = parseInt(e.startSlide, 10) || 0, _ = e.speed || 300;
            e.continuous = void 0 === e.continuous || e.continuous;
            var k, x, T = e.auto || 0, S = {}, E = {}, P = {
                handleEvent: function (t) {
                    switch (t.type) {
                        case"touchstart":
                            this.start(t);
                            break;
                        case"touchmove":
                            this.move(t);
                            break;
                        case"touchend":
                            p(this.end(t));
                            break;
                        case"webkitTransitionEnd":
                        case"msTransitionEnd":
                        case"oTransitionEnd":
                        case"otransitionend":
                        case"transitionend":
                            p(this.transitionEnd(t));
                            break;
                        case"resize":
                            p(n)
                    }
                    e.stopPropagation && t.stopPropagation()
                }, start: function (t) {
                    var e = t.touches[0];
                    S = {
                        x: e.pageX,
                        y: e.pageY,
                        time: +new Date
                    }, x = void 0, E = {}, b.addEventListener("touchmove", this, !1), b.addEventListener("touchend", this, !1)
                }, move: function (t) {
                    if (!(t.touches.length > 1 || t.scale && 1 !== t.scale)) {
                        e.disableScroll && t.preventDefault();
                        var n = t.touches[0];
                        E = {
                            x: n.pageX - S.x,
                            y: n.pageY - S.y
                        }, "undefined" == typeof x && (x = !!(x || Math.abs(E.x) < Math.abs(E.y))), x || (t.preventDefault(), h(), e.continuous ? (c(o(w - 1), E.x + m[o(w - 1)], 0), c(w, E.x + m[w], 0), c(o(w + 1), E.x + m[o(w + 1)], 0)) : (E.x = E.x / (!w && E.x > 0 || w == v.length - 1 && E.x < 0 ? Math.abs(E.x) / g + 1 : 1), c(w - 1, E.x + m[w - 1], 0), c(w, E.x + m[w], 0), c(w + 1, E.x + m[w + 1], 0)))
                    }
                }, end: function (t) {
                    var n = +new Date - S.time, i = Number(n) < 250 && Math.abs(E.x) > 20 || Math.abs(E.x) > g / 2,
                        r = !w && E.x > 0 || w == v.length - 1 && E.x < 0;
                    e.continuous && (r = !1);
                    var s = E.x < 0;
                    x || (i && !r ? (s ? (e.continuous ? (a(o(w - 1), -g, 0), a(o(w + 2), g, 0)) : a(w - 1, -g, 0), a(w, m[w] - g, _), a(o(w + 1), m[o(w + 1)] - g, _), w = o(w + 1)) : (e.continuous ? (a(o(w + 1), g, 0), a(o(w - 2), -g, 0)) : a(w + 1, g, 0), a(w, m[w] + g, _), a(o(w - 1), m[o(w - 1)] + g, _), w = o(w - 1)), e.callback && e.callback(w, v[w])) : e.continuous ? (a(o(w - 1), -g, _), a(w, 0, _), a(o(w + 1), g, _)) : (a(w - 1, -g, _), a(w, 0, _), a(w + 1, g, _))), b.removeEventListener("touchmove", P, !1), b.removeEventListener("touchend", P, !1)
                }, transitionEnd: function (t) {
                    parseInt(t.target.getAttribute("data-index"), 10) == w && (T && l(), e.transitionEnd && e.transitionEnd.call(t, w, v[w]))
                }
            };
            return n(), T && l(), f.addEventListener ? (f.touch && b.addEventListener("touchstart", P, !1), f.transitions && (b.addEventListener("webkitTransitionEnd", P, !1), b.addEventListener("msTransitionEnd", P, !1), b.addEventListener("oTransitionEnd", P, !1), b.addEventListener("otransitionend", P, !1), b.addEventListener("transitionend", P, !1)), window.addEventListener("resize", P, !1)) : window.onresize = function () {
                n()
            }, {
                setup: function () {
                    n()
                }, slide: function (t, e) {
                    h(), s(t, e)
                }, prev: function () {
                    h(), i()
                }, next: function () {
                    h(), r()
                }, stop: function () {
                    h()
                }, getPos: function () {
                    return w
                }, getNumSlides: function () {
                    return y
                }, kill: function () {
                    h(), b.style.width = "", b.style.left = "";
                    for (var t = v.length; t--;) {
                        var e = v[t];
                        e.style.width = "", e.style.left = "", f.transitions && c(t, 0, 0)
                    }
                    f.addEventListener ? (b.removeEventListener("touchstart", P, !1), b.removeEventListener("webkitTransitionEnd", P, !1), b.removeEventListener("msTransitionEnd", P, !1), b.removeEventListener("oTransitionEnd", P, !1), b.removeEventListener("otransitionend", P, !1), b.removeEventListener("transitionend", P, !1), window.removeEventListener("resize", P, !1)) : window.onresize = null
                }
            }
        }
    }

    var r;
    (window.jQuery || window.Zepto) && !function (t) {
        t.fn.Swipe = function (e) {
            return this.each(function () {
                t(this).data("Swipe", new i(t(this)[0], e))
            })
        }
    }(window.jQuery || window.Zepto), "undefined" != typeof t && t.exports ? t.exports = i : (n(34).cmd || n(35)) && (r = function (t, e, n) {
        return i
    }.call(e, n, e, t), !(void 0 !== r && (t.exports = r)))
}, function (t, e, n) {
    function i(t, e) {
        c.init(t, e)
    }

    var r = n(29), o = n(45), s = {recommendContent: r("#detailRecommendInline"), detailCommend: r("#detailRecommend")},
        a = n(73), c = {
            remoteUrl: {detailRec: "//detail.mall.meizu.com/api/item/recommendsH5"}, init: function (t, e) {
                var n = this;
                t && n.getRecommend(e)
            }, getRecommend: function (t) {
                var e = this;
                o.ajax(e.remoteUrl.detailRec, {itemId: t}, "get", "jsonp").done(function (t) {
                    t && t.length && (s.detailCommend.css("display", "block"), e.renderCoupon(t))
                })
            }, renderCoupon: function (t) {
                if (t) {
                    t.forEach(function (t, e) {
                        t.mtype = "mall_xgtj_kw_" + (e + 1)
                    });
                    var e = a({items: t});
                    s.recommendContent.append(e)
                }
            }
        };
    t.exports = i
}, function (module, exports) {
    module.exports = function (obj) {
        var __t, __p = "", __j = Array.prototype.join, print = function () {
            __p += __j.call(arguments, "")
        };
        with (obj || {}) {
            __p += '<div class="recommend">\n    <div class="title">相关推荐</div>\n    <div class="recommend-slider" id="J_recommendSlider">\n        <ul class="slider-wrap">\n            ';
            for (var i = 0, length = items.length; i < length; i++) __p += '\n            <li class="rs-item">\n                <a class="rs-item-wrap" title="' + (null == (__t = items[i].name) ? "" : __t) + '" href="' + (null == (__t = items[i].itemUrl) ? "" : __t) + '" target="_blank" data-mtype="' + (null == (__t = items[i].mtype) ? "" : __t) + '">\n                    <div class="mod-pic">\n                        <img class="recommend-pic" src="' + (null == (__t = items[i].imgUrl + "@240x240.jpg") ? "" : __t) + '"/>\n                    </div>\n            \n                    <div class="mod-desc">\n                        <p class="vm-name">' + (null == (__t = items[i].name) ? "" : __t) + '</p>\n                        <p class="vm-price">\n                            <small>¥</small>\n                            ', items[i].discountFlag ? (__p += '\n                                <span class="vm-price-text">' + (null == (__t = items[i].discountPrice) ? "" : __t) + "</span>\n                                ", items[i].discountPrice !== items[i].maxPrice && (__p += '\n                                  <span class="vm-price-qi">起</span>\n                                '), __p += "\n                            ") : (__p += '\n                                <span class="vm-price-text">' + (null == (__t = items[i].minPrice) ? "" : __t) + "</span>\n                                ", items[i].minPrice !== items[i].maxPrice && (__p += '\n                                    <span class="vm-price-qi">起</span>\n                                '), __p += "\n                            "), __p += "\n                        </p>\n                    </div>\n                </a>\n            </li>\n            ";
            __p += "\n        </ul>\n    </div>\n</div>\n  "
        }
        return __p
    }
}]);